Questions tagged [laravel-3]

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

392 questions
1
vote
1 answer

Laravel 3 - Cascade deletes on many to many relationships

I can't seem to work this out at the moment. I have 3 tables, interests, interest_user, and users, with a many-to-many relationship setup between them. If I delete an interest I want to make sure that any records in the pivot table are deleted as…
alexleonard
  • 1,314
  • 3
  • 21
  • 37
1
vote
2 answers

Laravel : Using controller in included view

I have a view that is rendered with its controller. The function that calls the view is linked in my routes. It works fine when directly accessing the route, but obviously my controller is not included when I include it in my template. How do I use…
veksen
  • 6,863
  • 5
  • 20
  • 33
1
vote
1 answer

How to save a many to many record in Laravel 3?

When I am creating a snippet model I want to directly add a relational record to the intermediate table but I get this error: Unhandled Exception Message: Method [save] is not defined on the Query class. When I execute this code: $new_snippet =…
Sjaak Rusma
  • 1,424
  • 3
  • 23
  • 36
1
vote
2 answers

Laravel: "Failed to open stream' in storage/views

I had my Laravel 3 application running on a different server. I wrapped it up and sent it to my new server. Unpacked it, and while I am trying to display the Laravel application on the new server, I receive this error: Unhandled Exception…
nitsuj
  • 780
  • 1
  • 11
  • 27
1
vote
2 answers

Laravel - highlighting the confirmation field for an error

I can't find a way to get Laravel to highlight the correct field when a _confirmation field is incorrect. Using a Bootstrap layout I've got an email and email_confirmation field in my form like this:
alexleonard
  • 1,314
  • 3
  • 21
  • 37
1
vote
6 answers

Laravel 4: custom login and check password

I would like to customize my login in laravel 4 where username is either his username or email so what I did is: public static function custom_login($uname,$pwd) { $res = DB::select("select * from users where (username = ? or email = ?) and…
Orvyl
  • 2,635
  • 6
  • 31
  • 47
1
vote
2 answers

Does Laravel has Rails' before_filters to bind variables into controller methods?

I'm extremely newbie on Ruby on Rails. Started learning both Ruby and Ruby on Rails just few hours ago and trying to adapt it's DRY principles into my own Laravel codes. This is how my RoR looks like: class WeddingController <…
Aristona
  • 8,611
  • 9
  • 54
  • 80
1
vote
1 answer

Laravel 3.x Route issue: page not found even with the route set

I got an annoying problem with a route, for a section of a CMS that I'm developing. I got routes for all the sections, "products", for example: Route::get('admin/products', array('as' => 'admin/products', 'uses'=> 'admin.products@index')); …
darksoulsong
  • 13,988
  • 14
  • 47
  • 90
1
vote
1 answer

Laravel 3 - set routes dyncamically

I am using Laravel 3 with two sets of login controllers - the main domain goes to login, all subdomains should route to portal/login@index I am using the following code in my routes.php: Route::filter('before', function() { $server = explode('.',…
jmadsen
  • 3,635
  • 2
  • 33
  • 49
1
vote
2 answers

Querying 3 tables mysql Laravel

I have multiple tables. Contests Entries Users User can submit entries to a contest, a user can submit multiple entries to a contest. I need to know the emails of the users that submitted an entry to a particular contest. The emails are in the…
Stephan-v
  • 19,255
  • 31
  • 115
  • 201
1
vote
0 answers

Laravel3 Validator: the "match:" rule is not seeing the closing delimiter. Is it a bug?

We have a content type which has been confirmed to match this regex: /([0-9]{4}|[0-9]{2}[+]{1})/ When trying 'match:"/([0-9]{4}|[0-9]{2}[+]{1})/"', L3 throws a "no ending delimiter '/' found" exception. Am I doing something wrong, or is there a…
mOrloff
  • 2,547
  • 4
  • 29
  • 48
1
vote
0 answers

Laravel 3 - why does sending parameters to Redirect::to_route not work

I am wondering why the parameters aren't recognized in this way: return Redirect::to_route('new_snippet', array(Input::get('snippet'), $validation_errors[0])); or this way: return Redirect::to_action('snippet@new', array(Input::get('snippet'),…
Sjaak Rusma
  • 1,424
  • 3
  • 23
  • 36
1
vote
1 answer

Can someone explain session table laravel

Ok so I want to check if my users are online or not, I think a good way of doing this is using the sessions table that laravel provides. I'm a newbie though so can anybody first of all explain to me what this data means. CREATE TABLE sessions ( …
Stephan-v
  • 19,255
  • 31
  • 115
  • 201
1
vote
1 answer

Laravel 3: Having difficulty getting my head wrapped around the `has_one()` relationship

Goal: My goal is to be able to call $entity->legalName()->first() and get the entities legal name. Models: ##### Entity ##### namespace Entity\Eloquent; class Entity extends \Eloquent{ public static $key = 'uuid'; public function…
mOrloff
  • 2,547
  • 4
  • 29
  • 48
1
vote
1 answer

Laravel 3: AJAX POST and return Response::download()?

I'm trying to return a file to be downloaded by the client however I've noticed that anything I put as a return value in my controller doesn't get returned to the client. Here's the code: Code in my Controller, I've removed unnecessary lines public…
dan2k3k4
  • 1,388
  • 2
  • 23
  • 48