Questions tagged [laravel-4]

Laravel 4.2 is the previous version of the open-source PHP web development MVC framework created by Taylor Otwell. Laravel helps you create applications using simple, expressive syntax.

Laravel 4.2 is the previous version of the open-source for web development created by Taylor Otwell. Laravel helps you create applications using simple, expressive syntax.

New Features Overview

  • All pieces have been decoupled into independent components, collectively called Illuminate
  • integration
  • Driver-based view system
  • Better integration with cloud storage
  • collections

Resources

See also the tag for general laravel based questions, from past versions.

Social Media

14441 questions
5
votes
5 answers

Laravel installed, but connection is reset / No data received

I am using Digital Ocean as my server, I have a Ubuntu droplet running laravel fine on my site. But now I am making a 'projects backend' where there is just a folder with test projects that are all laravel projects themselves. They are not linked to…
Haring10
  • 1,517
  • 1
  • 19
  • 37
5
votes
2 answers

Laravel remember me is always on

I am using Laravel 4.2 and I want to let users decide if they want their login to be remembered on their PC or not. So my login form looks like this: When you tick the checkbox, the post fields will have 'remember_me' => 'on'. The form posts to a…
Latheesan
  • 23,247
  • 32
  • 107
  • 201
5
votes
2 answers

How to change Database in Validator in Laravel

I want to Validate requested values from controller action by this way: // validate the info, create rules for the inputs $rules = array( 'username' => 'required|min:5|unique:users,username', 'email' =>…
Narkon
  • 398
  • 2
  • 17
5
votes
1 answer

Append new text field while clicking a button and remove by clicking button in Laravel 4

i have a form with two fields such as phone, email like below image. when i click on the plus button , i want to append one extra text field in form below the button. and i want to remove the text field when clicking the minus button. dynamically…
Jishad
  • 2,876
  • 8
  • 33
  • 62
5
votes
1 answer

How to catch model events in pivot tables

I want to track (record) the changes made to each database row. This means, saving a log of each action (insert, update, delete) made to each record of each table. This issue is solved for models, as they extend from a BaseModel and I'm using model…
Luís Cruz
  • 14,780
  • 16
  • 68
  • 100
5
votes
2 answers

Create and configure a Laravel project with PhpStorm

I am quite buzzed with the whole Homestead stuff and how it correlates with an IDE. Let's say I have my PhpStorm installed in ~/Developer/PhpStorm The Homestead is in ~/Developer/Homestead. This is how my YAML file in Homestead looks…
Milkncookiez
  • 6,817
  • 10
  • 57
  • 96
5
votes
1 answer

Extending the Laravel Eloquent\Collection Class

I understand that the default Eloquent\Collection class can be overridden in your model by using the method: public function newCollection(array $models = array()) { return new CustomCollection($models); } Which works great if I'm using…
Steve Bauman
  • 8,165
  • 7
  • 40
  • 56
5
votes
3 answers

Running "exists" queries in Laravel query builder

I'm using MySQL and have a table of 9 million rows and would like to quickly check if a record (id) exists or not. Based on some research it seems the fastest way is the following sql: SELECT EXISTS(SELECT 1 FROM table1 WHERE id = 100) Source: Best…
Anthony Vipond
  • 1,879
  • 2
  • 19
  • 21
5
votes
1 answer

Laravel - Overriding a resource route into a different route filter group

Laravel's routing doesn't seem to be working as expected? From what I understand, if I intend to override a route, all I need to do is to put the expected route before the other one. What I have is something like…
He Hui
  • 2,196
  • 4
  • 29
  • 46
5
votes
3 answers

generate dynamic sitemaps in a laravel project without using composer

I want to generate Dynamic sitemap for my laravel project. I had already searched in so many sites for an answer. some of them describes it using composer. I didn't get how to do that. and in some other sites they wrote codes to get urls from db in…
Zammuuz
  • 708
  • 4
  • 18
  • 43
5
votes
1 answer

Laravel: Difference between Facades and Aliases

Good day! The more I read, the more I get confused about this. What is the difference between a Facade and Aliases? I have this Class: /app/libraries/Project/Data.php namespace PJ; class Data { // It is much like a data container, with static…
Marco Madueño Mejía
  • 1,105
  • 2
  • 9
  • 7
5
votes
3 answers

Laravel : Prompt before deleting a user

I am successfully deleting records in my table using the code below. My only problem, I want it to prompt the user to confirm the action before deleting. {{link_to_route('individualprofiles.edit', 'Edit', array($ip->id))}} {{Form::open(array(…
fanbondi
  • 1,035
  • 5
  • 18
  • 37
5
votes
1 answer

Getting model "identifiableName()" from revisionable

In the revisionable package it's possible to get the identifiable name of a related model by defining the identifiableName() method on a model, setting the field to display instead of id. E.g. 'name' or 'title'. Is it possible to do similar with…
harryg
  • 23,311
  • 45
  • 125
  • 198
5
votes
1 answer

Laravel - Call to undefined method TrainingFacade::save()

I'm building a Laravel 4.2 app and I'm using Creolab's Modules package. It's an app for managing company trainings, so my module is called Trainings. All works well except saving newly created trainings. The error I receive when I submit the Create…
5
votes
2 answers

Laravel 4 - URI Parameters in Implicit Controllers

How to get URI parameters in methods inside a implicit controller? First, I define a base route: Route::controller('users', 'UserController'); Then, class UserController extends BaseController { public function getIndex() { // …
Paulo Coghi
  • 13,724
  • 14
  • 68
  • 90