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.
Questions tagged [laravel-3]
392 questions
4
votes
5 answers
Check for active user state with laravel
This is pretty standard login function and validation that works nicely. But I also want to check that the user is active. I have set up a column in my users table with 'active' set to either 0 or 1.
public function post_login()
{
$input =…

Stephan-v
- 19,255
- 31
- 115
- 201
4
votes
2 answers
Laravel 3 - How to validate checkbox array, for at least 1 checked?
I'm starting to learn Laravel and still on the learning curve. Now I'm starting with Laravel 3 but will most probably switch my project into Laravel 4 once I get something working.
Now the question being, how to validate an array of checkbox, I…

ghiscoding
- 12,308
- 6
- 69
- 112
4
votes
5 answers
How to make my own timestamp method in Laravel?
Typically, the Laravel platform have a $table->timestamps();
in migration..., it generate two datetime fields,
But I would like to implement my own timestamps or, maybe call unix_timestamps(). I would like to have two fields named created_at, and…

DNB5brims
- 29,344
- 50
- 131
- 195
4
votes
1 answer
In Laravel, what folder should I put a non-public data.json file?
I have another system that will drop in a data.json file somewhere onto my Laravel site/folder structure.
I want only Laravel to be able to be able to read the json file (i.e. a user can't see it by typing a url into a browser).
Where should this…

Lango
- 2,995
- 5
- 26
- 27
4
votes
2 answers
Laravel eloquent - One to many relationships
I have just got started with laravel v3 and am trying to wrap my head around eloquent's One-To-Many relationships by creating a blog, I have posts that have a many to one relationship with categories (Each Post is linked to a category).
I have the…

Allister
- 851
- 3
- 10
- 21
3
votes
0 answers
Global query scope , Multi-tenant architecture
I'm trying modify the existing code to do Global query scoping in Laravel 3!! for multi-tenant architecture.
Need some idea in terms of, how multi-tenant architecture is achievable in laravel 3
Thanks in advance :)

luffy
- 41
- 1
3
votes
1 answer
how to use encode and decode in laravel
In core php we use url_encode() and url_decode() so like this function we can use in laravel 4. If that's possible, please tell me how.
{{ $users-> username }} I want to encode $users->id. This…

user3825129
- 501
- 2
- 5
- 10
3
votes
2 answers
How to run php script on the command line while accessing laravel environment and classes
I have a laravel 3 environment on a web server but I want to run a php script on the command line. I'd like to access the same classes and methods that any php script within the laravel environment (for example a controller, model or view file)…

WildBill
- 9,143
- 15
- 63
- 87
3
votes
2 answers
Laravel image submit button
I'd like to know if there is a way to customize the look of a submit button (to be an Image instead) in Laravel 3.
Currently, my submit button code looks like this :
{{ Form::open('project/delete', 'DELETE') }}
{{ Form::hidden('id', $project->id)…

Felix4
- 185
- 4
- 10
3
votes
2 answers
Laravel's blade : showing template without its layout if it's a ajax request
so i'm using blade for my templates (apparently not the latest version but it's not important)
@layout('master')
@section('mainContent')
my contents here
@endsection
it works great but the thing is when im calling the page via ajax request i…

max
- 3,614
- 9
- 59
- 107
3
votes
1 answer
How to update multiple rows and database with same value at once? Laravel
I'm stuck in code. I managed to create a form that adds a multiple number of rows in db but I do not know how to update them at the same time when i need to use product_code as id.
This is table 1 (products) structure:
id | product_name |…

Aleksa
- 99
- 1
- 11
3
votes
4 answers
Laravel put array into selectbox
I am facing some problems with my selectbox, where i will put all available categories into the
In my controller i am using this snip:
return View::make("stories.add")
->with("title","Indsend novelle")
->with("categories",…

kim larsen
- 5,111
- 6
- 19
- 17
3
votes
5 answers
Laravel wrong public path file upload
I've deployed laravel with this guide.
http://juniorgrossi.com/deploying-laravel-applications-on-a-shared-host/
On my webserver I have a public_html file now containing all my publicly accesable files and a laravel folder containing the rest, so…

Stephan-v
- 19,255
- 31
- 115
- 201
3
votes
1 answer
Laravel Controller Routes with Parameters
I have a Laravel 3 application that has several REST-ful controllers.
The controllers that take no parameters (e.g. a controller that handles the URL /api/books) works fine, but when I try and access the URL of a controller that takes parameters…

Andrew M
- 4,208
- 11
- 42
- 67
3
votes
2 answers
Laravel: Get current object inside model class
I'm wondering if it's possible to access the current object when accessing a method of that object. for example the method fullname() below is used to get the full name of the user.
class User extends Eloquent
{
public function itineraries()…

iamjonesy
- 24,732
- 40
- 139
- 206