Questions tagged as 'laravel'

1
answer

PHP Artisan Make Command: Model Does Not Work

I'm using Composer to generate my PHP files and stuff. I think it makes programming much easier. For example, to generate a Controller I do this: php artisan controller:make NomeController It works! But typing: php artis...
asked by 13.05.2015 / 14:48
2
answers

Import library for Laravel 5

What I need I need to import the FPDF library, modified for the project. What I did Code is below, but I created a "Libraries" folder inside "App" and put the library there (with the name FPDF.php), I put in Aliasses the name of the cla...
asked by 16.03.2015 / 19:01
1
answer

Laravel - How to do a try / catch in the view?

Is there any way to do some try/catch in a view of Laravel 4 ? How could I implement the syntax of blade ? I would like something like: @try <div class="laravel test"> {{ $usuario->nome }} </div>...
asked by 14.07.2015 / 17:31
2
answers

Overcoming an Image with DIV

Gentlemen, I am pulling some images from the database, and when the user hover over them an opaque red color will be above them, and a title and text will be shown. I did this by putting the image into a div, and inside that div I put another di...
asked by 03.09.2014 / 19:53
1
answer

How to create functions available globally in laravel?

I would like to create functions that are globally available to reuse the code. What would be the best way to do this, in laravel ... The flow I need would be like this: I will receive a "Route" request    Then I'll process > "Con...
asked by 02.01.2019 / 00:12
5
answers

Form submission via AJAX, method PUT

Problem: I am trying to send a form with ajax via PUT, but it is returning the following message in the chrome console: PUT http://intranet.dev/%7B%7B%20URL::to('upload/'.Auth::user()-%3Eid)%20%7D%7D 403 (Forbidden) Script: Follo...
asked by 30.01.2014 / 13:42
2
answers

Validation classes Laravel

Good morning !! I have been using some validation classes for a long time (CPF, e-mail, CNPJ) at the moment I am starting to migrate to laravel and the doubt has arisen. Where do I put these validation classes? What good does laravel pract...
asked by 13.12.2018 / 11:25
1
answer

Integrity constraint violation in "Many to Many" create - Laravel

Context: By registering a company, by being "attached" several clients to it and that same customer can be "attached" in other companies. I have the following database structure: Model "Client": public function enterprises() { return...
asked by 12.12.2018 / 14:54
1
answer

How to do dynamic query using select in Laravel

I have in my view the with dashboard / index. This index has a table and a graph which, by default, contains information for the current month (first and last day of the month). I would like to dynamically update through select which has info...
asked by 11.12.2018 / 21:15
2
answers

Form in loop in laravel

Good morning, I'm trying to make a form in a loop for each row of the table, when the user clicks the button on one row, takes the data from that row and loads it on another page, but for some reason in the loop the inputs do not are inside the...
asked by 04.12.2018 / 13:27