Most voted "laravel-4" questions
Laravel is an open-source framework for developing web applications and services with PHP. Use this tag for specific questions about Laravel 4.
Learn more…141 questions
Sort by count of
-
1
votes1
answer7082
viewsOpen existing project Laravel
I need to open a project previously done in Aravel. I’ve never worked with Laravel, so I don’t know where I might be going wrong. the project came in a file . zip when I unpacked it created a folder…
laravel laravel-5 laravel-eloquent laravel-4 laravel-5.3asked 6 years, 9 months ago Cesar Vinicius 145 -
1
votes1
answer50
viewsHelp with view
I need to show two categories in one view. I tried the way below, but without success: public function index() { return View::make('Titles.IndexFutebol')->withType('time1')->withType('time2');…
-
1
votes2
answers1972
viewsRoute does not execute controller method
Good afternoon. I have a problem with my php code developed in Laravel 4. I have a Javascript function that executes an action using $.post and if successful, calls another Javascript function, this…
-
1
votes1
answer56
viewsHow do I set up Laravel 4 to automatically detect which environment I’m in (production and development)?
In the Laravel 4, we have a configuration file on app/config/database.php. And in the folder app/config/local/database.php you have another file. The Laravel 4 has a mechanism to be able to detect…
-
1
votes1
answer1832
viewsHow to customize the Laravel 4 error page?
When an error occurs in Laravel 4, with the configuration of app.debug equal to false, the following page is returned: In that case, so much for mistakes 500 how much to 404, this page is displayed.…
-
1
votes1
answer1419
viewsHow to add my validation in Laravel Validator?
In the Laravel, both the 4 and the 5, we have the class Validator, which allows specific validations to be made. By default there are several, such as required, email, same and others. But I would…
-
1
votes1
answer155
viewsQueries Builder Problems (Query Builder) in Laravel 4.2
Hello, I’m having trouble generating a querie using the Querie Builder of Laravel 4.2, the difficulty arises from the need that the resulting sentences for search in the database are within…
-
1
votes1
answer306
viewsFiles in public folder using Laravel 4.2 are inaccessible
Hello, I have an application where some files are created in the folder public of Laravel 4.2, then send an email to the user with the URL’s to download these files, but there is an error when…
-
1
votes1
answer89
viewsInstantiate class within bootstrap/start.php file Laravel 4.2?
I have an app running Laravel 4.2, I have a class that takes care of IP's in a blacklist, and this one is safe on the bench. I need that when a user accesses my application the system validates if…
-
1
votes2
answers750
viewsHow to use with on the return of a DB::Select - Laravel
To get the information, is being using a DB::RAW thus: That’s in the Repository. Already in Controller, I would like to use the with to bring the relationships made in the Model: But the DB::select…
-
1
votes1
answer109
viewsRelationship count in Laravel 4
In Laravel 4, we do not have the method present in Laravel 5.2 >= called withCount. That one withCount is responsible for adding to SELECT the counting of items related to the current entity. For…
-
1
votes1
answer85
viewsWhy can’t I overwrite a Collection in Laravel using the values() function?
I’m trying to overwrite my Collection so she can receive herself with the keys reordered, the reason is that I’m giving a Forget() and sometimes the deleted element has a key value equal to 0…
laravel-4asked 5 years, 8 months ago Gabriel Becher 193 -
1
votes1
answer169
viewsHow to make multiple database connections with Laravel 4.2
I have an app written on Laravel Framework 4.2, rotating in the PHP 5.6, in the Operating System Windows 7, connected to a mysql database, there was the need to make additional connection in another…
-
0
votes1
answer35
viewsError accessing project on laravel4
I’m getting an error accessing the project on laravel4. It was working, but when I restarted my computer and tried to access again. I get the following error: Errorexception unserialize(): Error at…
-
0
votes2
answers1209
viewsHow to make a ternary relationship in Laravel?
What is the best way to make a ternary relationship in Laravel? I am doing a "multi client/company" application (type Basecamp) and the following relationship appeared: one user has a (0 .. n)…
-
0
votes2
answers1147
viewsHow to Inherit Models in Laravel 4
Whereas you have the Models Pessoa and Usuario, and that a Usuario is a Pessoa (Usuario extends Pessoa), or Usuario belongsTo Pessoa and Pessoa hasOne Usuario. It is possible that the Usuario has…
-
0
votes1
answer191
viewsImproved image insertion in comics
How would be a way to minimize this image insertion code in the database? // controller/GaleriasController.php public function addGaleria { $galeria = new Galeria; $galeria->descricao = "galeria…
-
0
votes1
answer120
viewsForm::model+checkbox in view Edit
I’m using form::model for data editing. It works correctly but checkbox returns empty. How do I return the ones saved in bd? I want them to show the ones who are registered. For example: in the…
-
0
votes2
answers398
viewsAlternatives to pass data through Hidden fields
I’m creating a system, where I always need my object id in the BD, and in most of the system I send this id from the VIEW pro controller using the Hidden fields with a POST. Speaking of security,…
-
0
votes1
answer361
viewsLaravel - How to make a Try/catch in the view?
Is there any way to make some try/catch in a view of Laravel 4? How could I implement in the syntax of blade? I’d like something like: @try <div class="laravel test"> {{ $usuario->nome }}…
-
0
votes2
answers1110
viewsLaravel 4 (Eloquent) Error deleting records
Hello, in this code below I delete the database of the selected records in a list of chekboxes. I have an array of Ids that is mounted as follows: Array ( [0] => 810 [1] => 811 ) On top of…
-
0
votes2
answers2536
viewsLaravel - Accessing absolute directory path for download
I created a directory within /public called /uploads/pdf. In this directory I keep PDF files from which I need to download. I created an AJAX request for this that calls an application controller…
-
0
votes2
answers343
viewsSecuring routes in Laravel 4
after logging in the user system I would theoretically have to have some protected routes, how do I do that? In my case is returning error. Look at: Routes.php Route::group(['before' =>…
-
0
votes2
answers1625
viewsHow to know the current route on Laravel 4?
In Laravel 5, we can take the current route (I mean the class instance) using the class Illuminate\Http\Request, through the method route. Thus: public function handle(Request $request) { $rota =…
-
0
votes1
answer188
viewsWhat is the "url" option in the app/config/app.php configuration file.
In the Laravel 4, we have a configuration file app/config/app.php. There is an option called url. Many times I’ve seen this empty option: 'url' => '', And I also did the test to put some url…
-
0
votes0
answers85
viewsUpload images for the first time on a website
On this website www.nomalism.com There is a problem: When opening the site for the first time, especially in the store (search or search option) you notice that the images appear blurred or…
-
0
votes1
answer324
viewsLaravel 4.2 - Working with asynchronous tasks to generate reports . xlsx
Hello, I am working with an application in Laravel 4.2 and need that, when the user makes the request to generate a system report, a task is launched to generate the report, when this report is…
-
0
votes1
answer110
viewsResearch developed in Angularjs
I am completely "zero" in Angularjs and need to improve the search functionality on this site https://www.nomalism.com/pesquisa#/ that was not developed by me. Right now the search is "stuck" to the…
-
0
votes0
answers45
viewsBrowser opening JSON
I have a validator that returns a JSON to a . js that reads this JSON and displays the error messages or releases Submit. However, sometimes the browser opens JSON itself instead of showing the…
-
0
votes1
answer160
viewsGood Practices for URI in Restful API using Laravel
Good afternoon, I’m having to build my routes using the REST standard, but I want to do this using the tools that Laravel offers me, and in the right way. I have the following route to print my…
-
0
votes0
answers123
viewsProblems using Phpexcel cache system with Laravel 4.2
I’m trying to use the library’s cache system Phpexcel, but I am still getting memory overflow in my application. I need to use cache because I am generating reports with more than 100,000 records on…
-
0
votes0
answers225
viewsSending email with Laravel 4.2 does not reach recipients
Hello, I am trying to send emails using the Laravel 4.2 but the messages only arrive when the recipient’s email is the same as the one sent. The file configuration mail.php was like this: <?php…
-
0
votes0
answers25
viewsIs it possible to share validation failures between nested controllers?
I have two models, one child of the other, User and Address where User>hasOne>Address and I’m about to do the following: Request: [ 'User' => [ 'name' => 'fulano', 'etc' => 'etc' ],…
-
0
votes1
answer123
viewsHow to define providers that only work in a local environment with Laravel 4?
On Laravel 4, we have a file called app/config/app.php, that we use to be able to define configuration information that will be used in the application. When I am in development environment, I…
-
0
votes0
answers781
viewsSQLSTATE[HY000]: General error: 2053 when do I call a Stored Procedure?
I’m using Laravel 4.2 and I’m calling one Stored Procedure of a database on the server. Locally everything works fine, but on the server, using the same BD, gives error. The call is as follows:…
-
0
votes1
answer95
viewsEloquent Laravel 4.2 setting Null at equal values
I’m having trouble with the ORM Eloquent where I give update in a table and a column of that table is the same as mine input he leaves null. Example: Table name idade joão 10 using the command…
laravel-4asked 5 years, 8 months ago Hélio Biancardi 43 -
0
votes1
answer20
viewsLaravel 4 application does not write to files
I have an Apache server installed in the Centos 7 Operating System and an application built through the Laravel 4.2 Framework, I have already changed the permissions of the system directories with…
-
-1
votes2
answers372
viewsLaravel 4 Deploy Failure in Shared Hosting
I’m looking to move up my first project with the Laravel 4 framework and I’m in trouble. I uploaded all the files from the FTP project because there is no other option for hired service. I uploaded…
-
-1
votes1
answer575
viewsSend variable to the layout in laravel4 with Blade
I have a problem here I need to send a variable to my layout, I tried so: On the controller $this->layout->page = 'Atendentes'; and in the layout that @yield('page') the problem is that I need…
-
-2
votes1
answer27
viewsLaravel accessors does not work with field separated by _ with a letter
When I use the accessor with an ex.: "full name" field, I put it in the model: public Function getNomeCompletoAttribute($value) works perfectly. When I have an "address_c" field, I put it in the…
laravel-4asked 8 years, 8 months ago Rodrigo V. Lagos Eustáquio 51 -
-2
votes1
answer876
viewsLaravel Error 4.2 - SQLSTATE[HY000] [2054] Server charset Unknown to the client. Please, report to the Developers
I’m having problems in a web application using Laravel 4.2 the same worked in a Windows 7 environment with IIS + PHP 5.6 but I had to change the machine and create a new development environment.…