Laravel dev, Can I have the document how to make counter in laravel use session or cookie please?

|
beerstory19 2020-03-04 13:49:32
Ure doing localhost or host at a web hosting?
sadeqi125 2020-03-04 13:49:56
yes my project work correct in localhost
sadeqi125 2020-03-04 13:50:07
but i upload in cpanel
Gaurang Chauhan 2020-03-04 13:50:15
Roham0010 2020-03-04 13:47:43
For what use?

To give in college

beerstory19 2020-03-04 13:50:22
Please check with your database?
sadeqi125 2020-03-04 13:50:56
not work and not suport session
beerstory19 2020-03-04 13:51:16
When u login in cpanel, u must use cpanel account
sadeqi125 2020-03-04 13:51:21
do you whant see my controller
beerstory19 2020-03-04 13:51:26
Not laravel account
Roham0010 2020-03-04 13:51:26
sadeqi125 2020-03-04 13:47:11
i cant get login user in laravel in cpanel why?

You are stuck at this for couple of days, google it it’s not something that has a specific answer!

But what I can think of create a manual session like this in a route like:
$_SESSION[‘foo’] = ‘bar’;
echo $_SESSION[‘foo’];
execute the route then comment out first line and refresh the page again if bar didn’t appear session in you php configuration is disabled
if not its something with laravel

beerstory19 2020-03-04 13:52:04
U should try debug and see
Roham0010 2020-03-04 13:53:17
Roham0010 2020-03-04 13:51:26
You are stuck at this for couple of days, google it it’s not something that has a specific answer!

But what I can think of create a manual session like this in a route like:
$_SESSION[‘foo’] = ‘bar’;
echo $_SESSION[‘foo’];
execute the route then comment out first line and refresh the page again if bar didn’t appear session in you php configuration is disabled
if not its something with laravel

Also check your session driver is on file in config/session.php not anything else that you didn’t provide a driver for it like if it’s database you should migrate session driver table for it

sadeqi125 2020-03-04 13:53:35
Roham0010 2020-03-04 13:51:26
You are stuck at this for couple of days, google it it’s not something that has a specific answer!

But what I can think of create a manual session like this in a route like:
$_SESSION[‘foo’] = ‘bar’;
echo $_SESSION[‘foo’];
execute the route then comment out first line and refresh the page again if bar didn’t appear session in you php configuration is disabled
if not its something with laravel

session work dear

Roham0010 2020-03-04 13:54:05
sadeqi125 2020-03-04 13:53:35
session work dear

is your route in a web middleware?

beerstory19 2020-03-04 13:54:09
When u calling the login, try to debug
beerstory19 2020-03-04 13:54:14
See which line got problem
sadeqi125 2020-03-04 13:54:17
Roham0010 2020-03-04 13:51:26
You are stuck at this for couple of days, google it it’s not something that has a specific answer!

But what I can think of create a manual session like this in a route like:
$_SESSION[‘foo’] = ‘bar’;
echo $_SESSION[‘foo’];
execute the route then comment out first line and refresh the page again if bar didn’t appear session in you php configuration is disabled
if not its something with laravel

I was using Sessions to store the login, then redirect to the main dashboard, but when the middleware loads, the session is not initiated yet

sadeqi125 2020-03-04 13:54:55
Roham0010 2020-03-04 13:54:05
is your route in a web middleware?

Route::middleware(‘auth:admin’)->group(function(){

Roham0010 2020-03-04 13:55:11
take a picture of your routes send it here please
Roham0010 2020-03-04 13:55:31
sadeqi125 2020-03-04 13:54:55
Route::middleware(‘auth:admin’)->group(function(){

before this add web middleware group

2020-03-04 13:56:42
hi
can iclude aimeos projects into our laravel 6 project ?
sadeqi125 2020-03-04 13:57:14
Roham0010 2020-03-04 13:55:11
take a picture of your routes send it here please

laravel_discuss-28761.jpg

Roham0010 2020-03-04 13:57:58
sadeqi125 2020-03-04 13:57:14

it seems you don’t have a web middleware group!

sadeqi125 2020-03-04 13:58:35
Roham0010 2020-03-04 13:57:58
it seems you don’t have a web middleware group!

write me where add middleware

Roham0010 2020-03-04 13:59:05
before all your routes like auth:admin
Roham0010 2020-03-04 14:00:06
sadeqi125 2020-03-04 13:58:35
write me where add middleware

Route::group([‘middleware’ => [‘web’]], function () {
//
});

sadeqi125 2020-03-04 14:01:59
i had but not work
sadeqi125 2020-03-04 14:02:21
Roham0010 2020-03-04 13:59:05
before all your routes like auth:admin

i had but not work

sadeqi125 2020-03-04 14:02:50
go to my home page and then redirec it to login
sadeqi125 2020-03-04 14:03:01
Roham0010 2020-03-04 14:04:33
sadeqi125 2020-03-04 14:02:50
go to my home page and then redirec it to login

make auth resources again by
php artisan make:auth
then check it

sadeqi125 2020-03-04 14:05:06
Roham0010 2020-03-04 14:04:33
make auth resources again by
php artisan make:auth
then check it

my project is on cpanel

sadeqi125 2020-03-04 14:05:10
not in local
sadeqi125 2020-03-04 14:05:24
in local work correct
hamidshariati_ir 2020-03-04 14:05:58
anyone know about apiato.io
rethdaro 2020-03-04 15:58:12
Hello Laravel dev, Can I have the document how to make counter in laravel use session or cookie please?
Nimit1906 2020-03-04 17:20:21
How are migrate command in server
humaneguy 2020-03-04 18:25:15
How do i change edit to use token instead of id
Roham0010 2020-03-04 18:28:47
rethdaro 2020-03-04 15:58:12
Hello Laravel dev, Can I have the document how to make counter in laravel use session or cookie please?

what counter? like for a table number of rows?

Roham0010 2020-03-04 18:29:03
Nimit1906 2020-03-04 17:20:21
How are migrate command in server

like in local

rethdaro 2020-03-04 18:31:15
Roham0010 2020-03-04 18:28:47
what counter? like for a table number of rows?

I mean when someone visite my website, it will add new row to visitors table

Roham0010 2020-03-04 18:31:58
humaneguy 2020-03-04 18:25:15
How do i change edit to use token instead of id

use the token in your route like:
/users/{token}/edit
then add this to your user model like:
public function getRouteKeyName()
{
return ‘token’;
}

Roham0010 2020-03-04 18:33:00
rethdaro 2020-03-04 18:31:15
I mean when someone visite my website, it will add new row to visitors table

using database as you said it’s what you have to do if you want historical data

rethdaro 2020-03-04 18:34:35
Roham0010 2020-03-04 18:33:00
using database as you said it’s what you have to do if you want historical data

yes,… so do you have any document to do it please?

humaneguy 2020-03-04 18:35:10
Roham0010 2020-03-04 18:31:58
use the token in your route like:
/users/{token}/edit
then add this to your user model like:
public function getRouteKeyName()
{
return ‘token’;
}

I don’t really understand

Roham0010 2020-03-04 18:38:01
rethdaro 2020-03-04 18:34:35
yes,… so do you have any document to do it please?

there are some packages and it’s simple to write by your own what and where you have problem with it?

rethdaro 2020-03-04 18:39:51
Roham0010 2020-03-04 18:38:01
there are some packages and it’s simple to write by your own what and where you have problem with it?

I’m not yet test those packages… I planed to do by my self. but if you recomment me to install the pageake, I will test it

Roham0010 2020-03-04 18:40:23
humaneguy 2020-03-04 18:35:10
I don’t really understand

You want to bind a model with a string not with ID is it your situation? it this is it so you have to say to laravel my primary key is another field not id that method is doing this
and in your route noting else will change in route I used above it was wrong it’s same as you do before:
users/{user}/edit

Genius_29 2020-03-04 18:42:07
How can implement loan calculator in laravel I’m stack when using it to compare rates from a different Banks
Roham0010 2020-03-04 18:42:20
rethdaro 2020-03-04 18:39:51
I’m not yet test those packages… I planed to do by my self. but if you recomment me to install the pageake, I will test it

If you want my opinion I recommend using google tools like analytics and webmaster tools instead of you own if you have a complex situation with a specific goal you can write your own ..

|