Have you solve the errors you have?

|
Kapil Sharma 2021-02-17 05:48:30
Kapil Sharma 2021-02-16 17:09:14
I have contrroler and resource to build api here the problem is i am using overtrue like system and getting user liked videos and count for api ‘s

Problem is that i am not getting user liked data based on id of like table and stuck on how to do this as no like model is there

Help me in this i mstuck

hddhagai 2021-02-17 07:34:21
amir_0787 2021-02-17 00:34:20
I think so

What is the PHP version installed on your machine

amir_0787 2021-02-17 08:46:02
stealthSnake 2021-02-17 04:55:30
And how did you create your Controllers? it seems you hardcoded it. If it is created via
php artisan make:controller IndexController

it should have a correct namespace of

namespace AppHttpControllers;

unlesss you create a sub-folder inside the controller,

php artisan make:controller Front/IndexController

in laravel_project/App/Http/Controllers/Front/IndexController.php

namespace AppHttpControllersFront;

Useful points
Thanks bro

amir_0787 2021-02-17 08:46:22
hddhagai 2021-02-17 07:34:21
What is the PHP version installed on your machine

7.4.2

stealthSnake 2021-02-17 08:47:11
amir_0787 2021-02-17 08:46:02
Useful points
Thanks bro

Have you solve the errors you have?

amir_0787 2021-02-17 08:50:39
stealthSnake 2021-02-17 08:47:11
Have you solve the errors you have?

Not yet
I woke up 10 minutes ago
I will try it soon
If you have access to your pc I will thank you if you can take a look at my project by “code with me” plugin

stealthSnake 2021-02-17 08:54:18
amir_0787 2021-02-17 08:50:39
Not yet
I woke up 10 minutes ago
I will try it soon
If you have access to your pc I will thank you if you can take a look at my project by “code with me” plugin

I, do right now. But VSCode is the one I use.

amir_0787 2021-02-17 08:57:04
stealthSnake 2021-02-17 08:54:18
I, do right now. But VSCode is the one I use.

Is there a plugin which can do a code sharing?

stealthSnake 2021-02-17 09:12:12
amir_0787 2021-02-17 08:57:04
Is there a plugin which can do a code sharing?

I saw something in VSCode extensions.
Live Share
thouh I haven’t use it.

stealthSnake 2021-02-17 09:13:36
amir_0787 2021-02-17 08:57:04
Is there a plugin which can do a code sharing?

Or do you have git repo? So we can collaborate there and fix some other errors you might have

amir_0787 2021-02-17 09:22:04
stealthSnake 2021-02-17 09:13:36
Or do you have git repo? So we can collaborate there and fix some other errors you might have

i can’n send share link from vs code because of robot

stealthSnake 2021-02-17 09:22:20
amir_0787 2021-02-17 09:22:04
i can’n send share link from vs code because of robot

DM me instead the link

amir_0787 2021-02-17 09:22:20
can i send it in pv?
Billa_Bongg 2021-02-17 10:23:09
Hallo..When I visit any routes on my laravel app am getting the following:
uksort(): Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero

On my local machine the routes work perfect and I dont have a problem.The only difference is that on my local machine the php version is 7.4.2 while on the server its php 8…Can that be the issue?? as I cannot access any of my routes

Billa_Bongg 2021-02-17 10:44:31
Billa_Bongg 2021-02-17 10:23:09
Hallo..When I visit any routes on my laravel app am getting the following:
uksort(): Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero

On my local machine the routes work perfect and I dont have a problem.The only difference is that on my local machine the php version is 7.4.2 while on the server its php 8…Can that be the issue?? as I cannot access any of my routes

On the server I also used forcerooturl() because all the routes were still localhost

nazmulpcc 2021-02-17 10:49:40
Billa_Bongg 2021-02-17 10:23:09
Hallo..When I visit any routes on my laravel app am getting the following:
uksort(): Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero

On my local machine the routes work perfect and I dont have a problem.The only difference is that on my local machine the php version is 7.4.2 while on the server its php 8…Can that be the issue?? as I cannot access any of my routes

The PHP version is definitely the issue. downgrade php to 7.4 or upgrade Laravel to latest available version.

nazmulpcc 2021-02-17 10:50:32
Billa_Bongg 2021-02-17 10:44:31
On the server I also used forcerooturl() because all the routes were still localhost

Make sure you clear route cache and set APP_URL correctly, you don’t actually need forceRootUrl

Billa_Bongg 2021-02-17 10:52:15
nazmulpcc 2021-02-17 10:50:32
Make sure you clear route cache and set APP_URL correctly, you don’t actually need forceRootUrl

Thanks Nazmul Let me do it and see

Billa_Bongg 2021-02-17 10:57:25
nazmulpcc 2021-02-17 10:50:32
Make sure you clear route cache and set APP_URL correctly, you don’t actually need forceRootUrl

I have set the app_url correctly starting with the url protocol and commented out the forceurl code and also cleared route cache but when I hover on the url it shows localhost when I uncomment the forceurl code is when the url is picking my domain

stealthSnake 2021-02-17 11:00:24
Billa_Bongg 2021-02-17 10:57:25
I have set the app_url correctly starting with the url protocol and commented out the forceurl code and also cleared route cache but when I hover on the url it shows localhost when I uncomment the forceurl code is when the url is picking my domain

have you configured your hosting and domain?
Can I see your route files (web.php)

Billa_Bongg 2021-02-17 11:03:09
Here is my web.php:
<?php

use IlluminateSupportFacadesRoute;
use AppHttpControllersProgramController;
Route::middleware([‘auth:sanctum’, ‘verified’])->get(‘/program’, function () {
return view(‘program.list’);
})->name(‘program’);

Route::middleware([‘auth:sanctum’, ‘verified’])->get(‘/dashboard’, function () {
return view(‘dashboard’);
})->name(‘dashboard’);

The program route is the one with the issue

Billa_Bongg 2021-02-17 11:03:37
I am using apache and I did set it up with my domain
stealthSnake 2021-02-17 11:06:13
Billa_Bongg 2021-02-17 11:03:09
Here is my web.php:
<?php

use IlluminateSupportFacadesRoute;
use AppHttpControllersProgramController;
Route::middleware([‘auth:sanctum’, ‘verified’])->get(‘/program’, function () {
return view(‘program.list’);
})->name(‘program’);

Route::middleware([‘auth:sanctum’, ‘verified’])->get(‘/dashboard’, function () {
return view(‘dashboard’);
})->name(‘dashboard’);

The program route is the one with the issue

How about the dashboard? What URL it returns

Billa_Bongg 2021-02-17 11:07:48
stealthSnake 2021-02-17 11:06:13
How about the dashboard? What URL it returns

The dashboard is the default dashboard that is there once laravel is installed and it is rendering the dashboard view perfectly

Billa_Bongg 2021-02-17 11:08:10
But my view is not rendering
stealthSnake 2021-02-17 11:17:45
When you access your domain, what does it return?
Billa_Bongg 2021-02-17 11:26:10
Thanks @miraikara39 And Nazmul Thr issue was the php version…I have even removed the forceurl and all is good now…
agzpresh 2021-02-17 11:27:18
amir_0787 2021-02-17 09:22:04
i can’n send share link from vs code because of robot

Have you solved it finally?

amir_0787 2021-02-17 11:28:32
agzpresh 2021-02-17 11:27:18
Have you solved it finally?

yes
@miraikara39 found the error
that was all about local host server

agzpresh 2021-02-17 11:29:14
Alright then cool. Could you share the solution?
amir_0787 2021-02-17 11:30:56
agzpresh 2021-02-17 11:29:14
Alright then cool. Could you share the solution?

rewrite_mod
wasn’t working and in my php.ini file there was no rewrite_mod
i was using xampp
php version 7.4

agzpresh 2021-02-17 11:32:17
Ok. Cool.
amir_0787 2021-02-17 11:34:05
agzpresh 2021-02-17 11:32:17
Ok. Cool.

i thank you and @miraikara39 and all the friends who helped me

stealthSnake 2021-02-17 12:06:13
amir_0787 2021-02-17 11:34:05
i thank you and @miraikara39 and all the friends who helped me

Welcome

dhenish 2021-02-17 12:10:05
Hlw people anyone know how to US imperial convert to Metric In recipe project if you know let me know
|