Can we pass more than one number json by api to android?

|
2019-11-08 11:58:31
yes
2019-11-08 11:59:01
laravel_discuss-17371.jpg

2019-11-08 11:59:46
😳 I haven’t tried out 6, now 6.5 wtf
2019-11-08 12:00:25
2019-11-08 11:59:46
😳 I haven’t tried out 6, now 6.5 wtf

yeah

VimKanzo 2019-11-08 12:00:37
2019-11-08 11:59:46
😳 I haven’t tried out 6, now 6.5 wtf

ikr

2019-11-08 12:02:57
2019-11-08 11:59:46
😳 I haven’t tried out 6, now 6.5 wtf

Every six months a new version of laravel comes out

2019-11-08 12:44:35
2019-11-08 12:02:57
Every six months a new version of laravel comes out

laravel_discuss-17382.jpg
Meanwhile browsers be like

Mahdi_khani 2019-11-08 16:25:58
Can we pass more than one number json by api to android?
Sumeet Jadhav 2019-11-08 18:47:27
Need help
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

DesolatorMagno 2019-11-08 18:49:22
Why just don’t use a roles and permission packages? I had around 7 kind of login with 3 admin panels in my last project.
Sumeet Jadhav 2019-11-08 18:50:05
I cant use any package, as of now πŸ™
DesolatorMagno 2019-11-08 18:50:54
Just see how those packages work, it can give you a idea.
DesolatorMagno 2019-11-08 18:51:40
I guess it is like web and API
DesolatorMagno 2019-11-08 18:52:53
Sumeet Jadhav 2019-11-08 18:47:27
Need help
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.

Sumeet Jadhav 2019-11-08 18:53:52
Login types are
Facebook, google, etc
Sumeet Jadhav 2019-11-08 18:54:35
DesolatorMagno 2019-11-08 18:52:53
Did you tried using scope? Or just relationship with conditional.

I cant pass parameter, to add condition

mahdyfo 2019-11-08 18:56:15
Sumeet Jadhav 2019-11-08 18:53:52
Login types are
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.

DesolatorMagno 2019-11-08 18:57:25
Sumeet Jadhav 2019-11-08 18:54:35
I cant pass parameter, to add condition

Oh, to bad, you must be using the rare version of Laravel that don’t permit passing parameter.

DesolatorMagno 2019-11-08 18:57:52
You could pass a couple of screenshoot to se what you are doing.
Sumeet Jadhav 2019-11-08 19:00:20
mahdyfo 2019-11-08 18:56:15
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.

As per the login type i have to show scopes

Sumeet Jadhav 2019-11-08 19:00:53
DesolatorMagno 2019-11-08 18:57:52
You could pass a couple of screenshoot to se what you are doing.

Sure

Sumeet Jadhav 2019-11-08 19:01:47
laravel_discuss-17417.jpg
Table
Sumeet Jadhav 2019-11-08 19:03:11
laravel_discuss-17418.jpg

Sumeet Jadhav 2019-11-08 19:04:18
Auth::user()->permissionGivenScope
Sumeet Jadhav 2019-11-08 19:04:37
Sumeet Jadhav 2019-11-08 19:04:18
Auth::user()->permissionGivenScope

Gives me results of all login types

Sumeet Jadhav 2019-11-08 19:05:11
But if i try
Auth::user()->permissionGivenScope(2)
Sumeet Jadhav 2019-11-08 19:05:44
Result it does not give results, even after making change in relationship
Sumeet Jadhav 2019-11-08 19:06:08
And @DesolatorMagno : i am using the latest version
Sumeet Jadhav 2019-11-08 19:06:58
2019-11-06 20:56:22
If you are laravel developer please fill this short survey(only one question), thanks in advance
https://docs.google.com/forms/d/e/1FAIpQLSfgTwAKDqj8zMookVJJpU4U2QIjStj3_jV-B7wtS0MzV1kVFA/viewform?vc=0&c=0&w=1

Submitted

2019-11-08 19:08:35
Sumeet Jadhav 2019-11-08 19:06:58
Submitted

thanks very muchπŸ’—

Mahdi_khani 2019-11-08 19:44:18
DesolatorMagno 2019-11-08 18:49:22
Why just don’t use a roles and permission packages? I had around 7 kind of login with 3 admin panels in my last project.

Hi
Whats package name?

Sid 2019-11-08 20:09:20
https://www.youtube.com/watch?v=-2Km_oQMKAo&list=PL_o2jYI8ZAem6trK2765nPBEAskbGgZUT

Laravel 6 New Features in HindiYouTube
Laravel 6 New Features tutorial for beginners, Laravel 6 New Features Application Tutorial, laravel 6 New Features example, laravel 6 New Features in Hindi, …
Sid 2019-11-08 20:09:46
https://www.youtube.com/watch?v=jMG4UgGB7W8&t=384s

laravel 6 crud tutorialYouTube
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…
Sumeet Jadhav 2019-11-08 20:26:06
Mahdi_khani 2019-11-08 19:44:18
Hi
Whats package name?

Spatie/laravel-permission

praneet81 2019-11-08 21:57:41
Hello guys
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
praneet81 2019-11-08 21:57:49
So following laravel’s convention
praneet81 2019-11-08 21:58:29
I made a table named
consultant_consultant_category_speciality
praneet81 2019-11-08 21:58:45
laravel_discuss-17449.jpg

praneet81 2019-11-08 21:58:56
praneet81 2019-11-08 21:58:45

This is the migration structure

praneet81 2019-11-08 21:59:26
laravel_discuss-17451.jpg
And I’m getting this error
praneet81 2019-11-08 21:59:44
Why is it reading it as consultant_speciality??
Sid 2019-11-08 22:02:40
Hi Everyone,

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

Codeigniter 4WhatsApp.com
WhatsApp Group Invite
ravimakwana015 2019-11-08 22:20:15
Part – 2 https://youtu.be/NVQ-Kuo3lrw

Multiple Authentication in Laravel 5.8 – Hindi Part 2YouTube
Part – 2
ravimakwana015 2019-11-08 22:20:45
Please subscribe all and watch and learn something
ravimakwana015 2019-11-08 22:21:31
Part 1 link already sent in group
2019-11-09 08:11:19
I need help from your community. Spent a lot of time but can’t resolve it.

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’);
}

2019-11-09 08:21:54
2019-11-09 08:11:19
I need help from your community. Spent a lot of time but can’t resolve it.

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!

itsvahid_ab 2019-11-09 08:29:15
2019-11-09 08:21:54
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!

is there any errors?
also you’ve spelled motivator $motivator lowercase in the controller update function.. make sure that’s being loaded

2019-11-09 08:30:59
no errors in the logs (
itsvahid_ab 2019-11-09 08:37:34
2019-11-09 08:30:59
no errors in the logs (

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??

|