If you write php artisan and press enter, did you see auth?

|
oxbir 2020-07-27 02:34:41
I have tried to upload the image using Postman and the image is stored in the preferred directory and the name and is stored in database but i am getting the error response.
oxbir 2020-07-27 02:35:40
public function store(Request $request)
{
$design_studio = new DesignStudio;
$design_studio->user_id = 1;
$design_studio->title = $request->title;
$design_studio->lang = $request->lang;
$design_studio->body = $request->body;
if($request->has(‘image’)) {
$image = $request->file(‘image’);
$filename = $image->getClientOriginalName();
$image->move(public_path(‘images/slideShow’), $filename);
$design_studio->image = $request->file(‘image’)->getClientOriginalName();
}
if ($sliders = $request->file(‘sliders’)) {
foreach ($sliders as $slider) {
$filename = rand(111111, 999999);
$extension = $request->file(‘sliders’)->extension();
$getFileExt = $filename + ‘.’ +$extension;
$slider->move(public_path(‘images/design-studios/’), $getFileExt);
$data[] = $getFileExt;
}
}
$design_studio->sliders = json_encode($data);
$design_studio->save();
$design_studio->categories()->attach($request->category);
return redirect()->route(‘design-studios.index’);
}
2020-07-27 07:13:55
How to create a live chat in laravel
Avinash 2020-07-27 07:24:32
2020-07-27 07:13:55
How to create a live chat in laravel

Here is an example https://bit.ly/live-chat-pusher

Laravel 7: Live Chat With PusherUdemy
Avinash 2020-07-27 07:25:13
And if you are looking for one to one chat. This is the one https://bit.ly/laravel-chat-1to1

Laravel Vuejs Private (one to one) Chat AppUdemy
An Advanced One to One Chat App with Laravel as backend, Vuejs as frontend & Pusher Channels for making things Real Time
2020-07-27 08:31:26
I have a source code of that how to access that code in xamp server
2020-07-27 11:33:30
I want to block the user but the code is wrong
2020-07-27 11:33:45
if (Auth::user()) { // first check if there is a logged in user
$flag =$request->flag; // get user flag

if ($flag== 0) {

$message = ‘Your account has been suspended’;
return view(‘backend.15’)->withMessage($message);

}

2020-07-27 11:33:57
please help me thanks
absoluthalal 2020-07-27 11:35:45
2020-07-27 11:33:45
if (Auth::user()) { // first check if there is a logged in user
$flag =$request->flag; // get user flag

if ($flag== 0) {

$message = ‘Your account has been suspended’;
return view(‘backend.15’)->withMessage($message);

}

$flag = $request->flag not falg

2020-07-27 11:38:59
absoluthalal 2020-07-27 11:35:45
$flag = $request->flag not falg

Yes, it was wrong, but still my code does not work. A user whose value is zero logs in again. What should I do?

Inwizard1 2020-07-27 11:40:24
Flag falg?
cayetanohosma 2020-07-27 11:51:41
2020-07-27 11:33:45
if (Auth::user()) { // first check if there is a logged in user
$flag =$request->flag; // get user flag

if ($flag== 0) {

$message = ‘Your account has been suspended’;
return view(‘backend.15’)->withMessage($message);

}

I guess the problem is at first line, the user is logged at that point, so if you want to logout him, you must do explicitly. I think that the best place is before returning the view.

2020-07-27 11:54:35
You know an article that explains this
Arfin_Mustofa 2020-07-27 12:32:31
laravel_discuss-46349.jpg
how to page break with php/css?
kalpeshchauhan90 2020-07-27 12:35:50
I want learn laravel
Z_Yamin 2020-07-27 12:49:59
Method IlluminateDatabaseEloquentCollection::createToken does not exist. any one know what is the reason of this error?
2020-07-27 12:50:10
laravel_discuss-46356.jpg
I am getting this problem while creating laravel project . how to fix this. please help
2020-07-27 12:53:47
2020-07-27 12:50:10
I am getting this problem while creating laravel project . how to fix this. please help

please can anyone share the fixing details i am new to this . i am just start the learning

Z_Yamin 2020-07-27 12:54:52
why you not use from composer?
Z_Yamin 2020-07-27 12:55:05
did you install composer?
2020-07-27 12:55:11
i am using coomposer only
2020-07-27 12:55:22
yes i installed
2020-07-27 12:57:03
laravel_discuss-46362.jpg
i installed
Z_Yamin 2020-07-27 12:57:45
use this command :
Z_Yamin 2020-07-27 12:57:57
composer create-project –prefer-dist laravel/laravel blog
2020-07-27 12:59:28
its loading
Avinash 2020-07-27 12:59:52
2020-07-27 12:53:47
please can anyone share the fixing details i am new to this . i am just start the learning

Install those packages file info and whatever errors it shows. Mostly because you are using latest Laravel version with old php

hamid6489 2020-07-27 13:00:24
hello i have some problem with fetching data in just chrome
2020-07-27 13:00:33
i am using php 7.4.8
hamid6489 2020-07-27 13:00:34
http://myagah.com:9090/api/products
hamid6489 2020-07-27 13:01:03
hamid6489 2020-07-27 13:00:34
http://myagah.com:9090/api/products

this is fine with other platforms

isofdev 2020-07-27 13:01:11
Z_Yamin 2020-07-27 12:49:59
Method IlluminateDatabaseEloquentCollection::createToken does not exist. any one know what is the reason of this error?

Show code

hamid6489 2020-07-27 13:01:40
but with chrome my data would be incomplete
hamid6489 2020-07-27 13:01:50
plz help
hamid6489 2020-07-27 13:02:10
http://myagah.com:9090/api/products
hamid6489 2020-07-27 13:02:23
this is my url
Z_Yamin 2020-07-27 13:04:01
hamid6489 2020-07-27 13:02:23
this is my url

this is api, of course it show like this

hamid6489 2020-07-27 13:04:49
Z_Yamin 2020-07-27 13:04:01
this is api, of course it show like this

open on other platforms
it would be compeleted
but in chrome it is incompleted

Z_Yamin 2020-07-27 13:07:43
hamid6489 2020-07-27 13:04:49
open on other platforms
it would be compeleted
but in chrome it is incompleted

yeah you are right

Z_Yamin 2020-07-27 13:08:45
Z_Yamin 2020-07-27 13:07:43
yeah you are right

I don’t know why it is like that

sahilbalgotra 2020-07-27 15:29:22
Hi need help laravel project run on local without adding public in routes of css and ja but in live ist needed public/style.cs
sahilbalgotra 2020-07-27 15:29:32
Same with images
Z_Yamin 2020-07-27 15:30:24
please show some code
Z_Yamin 2020-07-27 15:30:42
You can use asset
. 2020-07-27 15:45:43
sahilbalgotra 2020-07-27 15:29:22
Hi need help laravel project run on local without adding public in routes of css and ja but in live ist needed public/style.cs

{{asset()}}

Mr_Classy 2020-07-27 16:24:57
I m using laravel 6.18
When I m run cmnd for authentication
Php artisan make:auth
Give me this type of error
Mr_Classy 2020-07-27 16:25:25
laravel_discuss-46387.jpg

Mr_Classy 2020-07-27 16:25:37
How can I solved this ?
cayetanohosma 2020-07-27 16:26:38
If you write php artisan and press enter, did you see auth?
|