Can we pass more than one number json by api to android?
Did you tried using scope?
Whats package name?
is there any errors?

yeah
ikr
Every six months a new version of laravel comes out
Meanwhile browsers be like
Use case
User has different types of login
And
These different types of login has different types of permission
Table structure for user permission is
user_id, login_type, scope_id, scope_status
What i want is to
To fetch this user_permission data
So i created relationship in user model for user_permission
But this relationship gives me scope of all login type for that user
But i want to pass a parameter for logintype and for that only i need scope
But seems parameter passing is not supported
Use case
User has different types of login
And
These different types of login has different types of permission
Table structure for user permission is
user_id, login_type, scope_id, scope_status
What i want is to
To fetch this user_permission data
So i created relationship in user model for user_permission
But this relationship gives me scope of all login type for that user
But i want to pass a parameter for logintype and for that only i need scope
But seems parameter passing is not supported
Did you tried using scope? Or just relationship with conditional.
Facebook, google, etc
I cant pass parameter, to add condition
Facebook, google, etc
Why do you want to save it each time user logs in π€ I think the logic is incorrect that you can’t turn it into code.
Oh, to bad, you must be using the rare version of Laravel that don’t permit passing parameter.
As per the login type i have to show scopes
Sure

Table

Gives me results of all login types
Auth::user()->permissionGivenScope(2)
https://docs.google.com/forms/d/e/1FAIpQLSfgTwAKDqj8zMookVJJpU4U2QIjStj3_jV-B7wtS0MzV1kVFA/viewform?vc=0&c=0&w=1
Submitted
thanks very muchπ
Hi
Whats package name?
Laravel 6 New Features tutorial for beginners, Laravel 6 New Features Application Tutorial, laravel 6 New Features example, laravel 6 New Features in Hindi, …
Laravel 6 crud tutorial for beginners, Laravel 6 CRUD Application Tutorial, laravel 6 crud example ,laravel 6 crud in Hindi, installing new laravel with Sour…
Whats package name?
Spatie/laravel-permission
I’ve 3 tables named as below
consultants
specialities
consultant_categories
Now the relation between consultants and specialities is belongs to many and relation between consultant and consultant categories is also belongs to many
consultant_consultant_category_speciality

This is the migration structure

And I’m getting this error
Anyone want to learn Codeigniter 4 you can join this group and you can learn Codeigniter 4 from scratch everything about Codeigniter.
And I will make live project also limited seated available hurry up.
https://chat.whatsapp.com/J00BXcCue2fJRVbNoyHH6G
WhatsApp Group Invite
Part – 2
Want to update record in database – for some tables its worked perfectly. But for latest one which I am assume made same it’s suddenly not working.
My piece of codes:
Laravel Framework 5.7.15
Route
Route::patch(‘/admin/motivators/{motivation}’, ‘MotivatorsController@update’)->name(‘motivators.update’);
Migration Schema
Schema::create(‘motivators’, function (Blueprint $table) {
$table->increments(‘id’);
$table->string(‘motivation’);
$table->string(‘participant’);
$table->timestamps();
});
Seeder
DB::table(‘motivators’)->insert([
[
‘motivation’ => ‘motivation 1’,
‘participant’ => ‘iSmarty PRO’,
‘created_at’ => Carbon::now(),
‘updated_at’ => Carbon::now()
],
[
‘motivation’ => ‘motivation 2’,
‘participant’ => ‘iSmarty PRO’,
‘created_at’ => Carbon::now(),
‘updated_at’ => Carbon::now()
]]);
View
<form action=”{{ route(‘motivators.update’, $data[‘motivator’]->id) }}” method=”post”>
{{ method_field(‘PATCH’) }}
{{ csrf_field() }}
<textarea name=”motivation”>{{ $data[‘motivator’]->motivation }}</textarea>
<input type=”text” name=”participant” value=”{{$data[‘motivator’]->participant}}”>
<button type=”submit” class=”btn btn-success”>Update</button>
</form>
Model
class motivator extends Model
{
protected $fillable = [‘motivation’,’participant’];
}
Controller
public function update(Request $request, motivator $motivator, $id)
{
$motivator->update(Request([‘motivation’,’participant’]));
/*$motivator->motivation = $request->motivation;
$motivator->participant = $request->participant;
$motivator->update(); */
return redirect(‘/admin/motivators’);
}
Want to update record in database – for some tables its worked perfectly. But for latest one which I am assume made same it’s suddenly not working.
My piece of codes:
Laravel Framework 5.7.15
Route
Route::patch(‘/admin/motivators/{motivation}’, ‘MotivatorsController@update’)->name(‘motivators.update’);
Migration Schema
Schema::create(‘motivators’, function (Blueprint $table) {
$table->increments(‘id’);
$table->string(‘motivation’);
$table->string(‘participant’);
$table->timestamps();
});
Seeder
DB::table(‘motivators’)->insert([
[
‘motivation’ => ‘motivation 1’,
‘participant’ => ‘iSmarty PRO’,
‘created_at’ => Carbon::now(),
‘updated_at’ => Carbon::now()
],
[
‘motivation’ => ‘motivation 2’,
‘participant’ => ‘iSmarty PRO’,
‘created_at’ => Carbon::now(),
‘updated_at’ => Carbon::now()
]]);
View
<form action=”{{ route(‘motivators.update’, $data[‘motivator’]->id) }}” method=”post”>
{{ method_field(‘PATCH’) }}
{{ csrf_field() }}
<textarea name=”motivation”>{{ $data[‘motivator’]->motivation }}</textarea>
<input type=”text” name=”participant” value=”{{$data[‘motivator’]->participant}}”>
<button type=”submit” class=”btn btn-success”>Update</button>
</form>
Model
class motivator extends Model
{
protected $fillable = [‘motivation’,’participant’];
}
Controller
public function update(Request $request, motivator $motivator, $id)
{
$motivator->update(Request([‘motivation’,’participant’]));
/*$motivator->motivation = $request->motivation;
$motivator->participant = $request->participant;
$motivator->update(); */
return redirect(‘/admin/motivators’);
}
Everything seems ok – but it not updating the record. If somebody can help I am appreciated. (Spent few hours and tried make few changes not success, might be some typos there – cant find – recopy and paste everything same result – NOT Updating the record).
Thanks a lot!
Thanks a lot!
is there any errors?
also you’ve spelled motivator $motivator lowercase in the controller update function.. make sure that’s being loaded
in your Patch route you’re getting {motivation} variable but in controller setting a “motivator” and $id
if you dd($motivator), do you get the motivator model??