Questions tagged as 'laravel'

1
answer

Problems deleting via ajax with laravel

I'm having trouble effecting a deletion with Laravel 5.3 . By submitting the ajax it simply is not returning anything to me. My JavaScript looks like this: $.ajaxSetup({ headers: { 'csrftoken' : '{{ csrf_token() }}' } }); func...
asked by 08.12.2016 / 23:25
2
answers

Using theme with laravel

Well, I need to use a theme but I'm not understanding where I should put the files, besides I'm having problems with importing the css files, actually the files I'm putting inside views. My folder structures are as follows: -resources -css -er...
asked by 10.07.2016 / 04:28
1
answer

Deploy Laravel project by Git

I need to deploy a Laravel project installed on a dev pc on a Linux server. After downloading everything via Git, some folders are ignored by .gitignore . How do I turn Composer to reinstall all dependencies? Do you have npm too?   ...
asked by 21.06.2016 / 00:03
1
answer

Is there any way to get the original value of an attribute from a Model after modifying it?

I'm using Laravel 5 and would like to know if after modifying an attribute of a model, you can retrieve it. For example: $usuario = Usuario::where(['nome' => 'Wallace'])->first(); $usuario->nome = 'Guilherme'; In the example...
asked by 22.06.2016 / 16:21
2
answers

Laravel, foreach and database

I have the following table in the database public function up() { Schema::create('cidades', function (Blueprint $table) { $table->increments('id'); $table->integer('uf'); $table->string('nome_uf');...
asked by 20.06.2016 / 19:52
1
answer

Is it possible to sort the result of the parent Model by the child model? [duplicate]

Controller $menu = MenuLoginPermission::with('submenu') ->where('id_empresa_login', '=', $idUser) ->get(); Model MenuLoginPermission class MenuLoginPermission extends Model { public function menu(...
asked by 07.10.2016 / 17:31
2
answers

Sorting Laravel with Relationship

I want to do a related query, but the ordering must be done by a field from another table that is in the relationship. $consulta = Dealer::whereIdMarca($codMarca) ->whereIdCidade($codCidade) -&...
asked by 31.03.2016 / 21:24
1
answer

Create Postgres Numeric Field in Laravel 5.1

I need to create a field of type numeric existing in postgres using migrations of laravel, can someone tell me how to do it? I tried this but did not rotate: public function up() { Schema::create('complementos', function (Bluep...
asked by 14.04.2016 / 21:11
1
answer

Activate Mode Maintenance Laravel 5.1 Without Artisan

I know there is the php artisan down command to enable maintenance mode, but I have my application hosted and I do not know how to give this command. Would you have some other way to do that? Editing a file?     
asked by 04.02.2016 / 20:48
2
answers

Laravel Eloquent pick up only one field from a record

I'm new to laravel and I have a problem $profile_id = Profile::where("customer_id",$data["customer_id"])->where('is_default', 1)->select('id')->first()->get(); From this query, how do I get the field id ? I tried $pro...
asked by 04.02.2016 / 16:53