Category "laravel-4"

Get name of Language instead of Locale name (in Laravel)?

How do I fetch name of locale (language) not just a locale string, but rather the name of that language in LARAVEL? {{ app()->getLocale() }}

ERROR!!! Illuminate\Database\QueryException SQLSTATE[42S02]: Base table or view not found: 1146 Table

I ran into an error and I have not figured out how to resolve it alone. so I opted to get help from this community. I will explain a bit though the screenshots

laravel controller function parameters

I'm trying to call a function inside one of my controller from the action() helper function. I need to pass a paramter to my function. Here is the funciton I'm

How can I resolve "Your requirements could not be resolved to an installable set of packages" error?

When I run composer update I receive some wired output. Here is my composer.json look like. { "name": "laravel/laravel", "description": "The Laravel

How do I call Validator from a namespace with an already existing Validator class

I'm trying to test a function in phpspec which calls Laravel's Validator::make function (http://laravel.com/docs/4.2/validation) However, I'm trying to call th

Laravel attach pivot to table with multiple values

Background I'm creating a database revolving around food allergies and I have a many to many relationship between foods and allergies. There is also a pivot va

How can I make Laravel return a custom error for a JSON REST API

I'm developing some kind of RESTful API. When some error occurs, I throw an App::abort($code, $message) error. The problem is: I want him to throw a json form

How Do I Seed My Database in the setupBeforeClass Method in a Laravel 4 Unit Test?

I have a Laravel 4 test class with some tests for which I want to seed my database before running the tests. Using the setup() function to reseed for each test

Laravel 5.1 Unknown database type enum requested

While running php artisan migrate, I got the following error [Doctrine\DBAL\DBALException] Unknown database type enum requested, Doctrine\DBAL\Platforms

Convert date and time to Jalali in Laravel

I want to change the time and date calendar to Jalali (Shamsi calendar used in Iran) in my system. How can I do this? "language_title" => "English",

Convert date and time to Jalali in Laravel

I want to change the time and date calendar to Jalali (Shamsi calendar used in Iran) in my system. How can I do this? "language_title" => "English",

how to get value from array in laravel

In laravel i get this type of array from where query. i want to get only those menu where parent is 0; $memus = Menu::where('parent', 0)->get()->toArra

Is it possible to temporarily disable event in Laravel?

I have the following code in 'saved' model event: Session::flash('info', 'Data has been saved.')` so everytime the model is saved I can have a flash message

Define the selected option with the old input in Laravel / Blade

I have this code: <select required="required" class="form-control" name="title"> <option></option> @foreach ($titles as $key => $v

Laravel PHP: multiple project run at the same time [closed]

I want to run multiple laravel frame work project at the same time.Exactly how to do it I dont know. I used a command : php artisan serv

Laravel dosen't connect with Oracle

I'm using yajra/laravel-oci8 for Oracle connection with laravel. But I couldn't connected to Oracle, from my client PC to Server. showing this error: I'm u

Laravel 4 Redirect::back() not going to previous page (refreshing current page)

I have a simple Lavel 4 project and I am trying to do a simple redirect to the previous page after the information has been submitted. However, when inserting R

Laravel Pagination links not including other GET parameters

I am using Eloquent together with Laravel 4's Pagination class. Problem: When there are some GET parameters in the URL, eg: http://site.com/users?gender=female