Questions tagged [laravel-5.6]

Laravel 5.6 is a previous version of the open-source PHP web framework created by Taylor Otwell. It was released on February 7, 2018. Use it in addition to the laravel-5 tag if your question is specific to Laravel 5.6. Use the Laravel tag for general Laravel related questions.

Laravel 5.6 is a previous version of Laravel 5. It was released on February 7, 2018.

What is new:

  • Logging Improvements
  • Single Server Task Scheduling
  • Dynamic Rate Limiting
  • Broadcast Channel Classes
  • Model Serialization Improvements
  • Argon2 Password Hashing
  • Collision (Pretty CLI Output)
  • Bootstrap 4

Resources:

1859 questions
5
votes
3 answers

Laravel 5.6 Api - Search,sort and filter on list of data

Hi I am developing a rest api endpoint for retrieving paginated list of users. In the frontend, there are options to search with all the listed columns, sort by all columns and filter by name, status and created date. So far I have created a…
Zammuuz
  • 708
  • 4
  • 18
  • 43
5
votes
3 answers

Changing email column name in laravel 5.6 in default users table

I have my own users table which I want to use in auth, but the problem is the email field is "userEmail" instead of "email". For login page I overided the below method in LoginController.php public function username() { return…
Asif Rao
  • 199
  • 2
  • 15
5
votes
2 answers

Object of class Symfony\Component\HttpFoundation\ParameterBag could not be converted to string

Symfony version(s) affected: ~4.0 Description I am using laravel(5.6.*) and write simple eloquent query as follows. $query = "something"; $products = Product:: where('title', $query) ->paginate($limit); But i get "Object of class…
Milind Patel
  • 2,677
  • 4
  • 14
  • 31
5
votes
3 answers

Laravel 5 Form request, require input on create, but optional on edit

I am using laravel 5.6 resources controllers and form request the problem is that i have some inputs that are required on created, but on edit are optionals like file inputs. So i have this form request
5
votes
1 answer

how to change tymon jwt authentication to use member model instead of user model in laravel 5.6?

In my project I have users and members tables and eloquent models. I'm going to use jwt authentication in members table and I changed corresponding config files, but still it goes to User model. Here is config/auth.php : return…
Ever Adm
  • 61
  • 2
  • 6
5
votes
1 answer

Laravel Model casts not working properly

I am currently working on my Laravel application but I am running into a problem. I have a model called StoreDataProduct which has two casts protected $casts = [ 'default_image' => 'array', 'images' => 'array', ]; Now in two places…
Ferdi van der Woerd
  • 366
  • 1
  • 4
  • 22
5
votes
5 answers

Laravel 5.6. How to test JSON/JSONb columns

$this->assertDatabaseHas() not working with JSON/JSONb columns. So how can I tests these types of columns in Laravel? Currently, I have a store action. How can I perform an assertion, that a specific column with pre-defined values was…
D.R.
  • 2,540
  • 3
  • 24
  • 49
5
votes
3 answers

Container::getAlias($abstract) throws ErrorException: Illegal offset type in isset or empty when $abstract there is not in $this->aliases[]

Laravel Version: 5.6.16 PHP Version: 7.2.3 Database Driver & Version: N/A Description: laravel\framework\src\Illuminate\Container\Container.php public function getAlias($abstract) throws ErrorException: Illegal offset type in isset or empty when…
user2928048
  • 3,940
  • 2
  • 12
  • 12
5
votes
1 answer

Envoyer Deployment with custom artisan command fails

I have a problem deploying my project with envoyer which executes an artisan-command I created. The command gets all my users, performs another artisan command ($this->call('command')) and performs it actions by iterating through all the users. The…
Slatyoo
  • 130
  • 15
5
votes
4 answers

Is there a way to map a raw query to a Model

I have a complex raw SQL query that I don't want to retro-convert to query builder. Is there a way to map the result of the query to a model? In short, I have this kind of query: SELECT users.* FROM users WHERE exists (super_long_raw_query) AND…
rap-2-h
  • 30,204
  • 37
  • 167
  • 263
5
votes
1 answer

Laravel Store Value if Checkbox is Checked

I am storing multiple values in Laravel. In the form, I have check box for each input and I want to store value if checkbox is checked for that input. The problem I am facing is no matter which checkbox I check, its always saving from first input…
Ahsan
  • 1,289
  • 3
  • 13
  • 37
5
votes
1 answer

laravel 5.6 id is automatically casted to int

I'm using Laravel 5.6 with the following table structure: public function up() { Schema::create( 'traffic', function ( Blueprint $table ) { $table->string( 'id' ); $table->unsignedInteger( 'category_id' ); …
user936965
5
votes
6 answers

How can I make query where json column in the laravel?

I use laravel 5.6 I have a field. The data type of the field is json The value of the field (desc field) like this : [ {"code": "1", "club": "CHE", "country": "ENGLAND"}, {"code": "2", "club": "BAY", "country": "GERMANY"}, {"code": "3", "club":…
moses toh
  • 12,344
  • 71
  • 243
  • 443
5
votes
1 answer

captcha form validation required error message in vue-recaptcha

I am following this Package in vue.js and Laravel 5.6.7 to implement captcha. https://github.com/DanSnow/vue-recaptcha#install Component code in vue.js