dohisev

Experience

430

0 Best Reply Awards

  • Member Since 3 Weeks Ago
  • 0 Lessons Completed
  • 0 Favorites

13th November, 2017

dohisev left a reply on Laravel.log Could Not Be Opened: Failed To Open Stream: Permission Denied • 1 week ago

The only permission that works is setting 0777 to storage, other than that doesn't work.

dohisev left a reply on Laravel.log Could Not Be Opened: Failed To Open Stream: Permission Denied • 1 week ago

chgrp: invalid group:apache'`

dohisev left a reply on Laravel On Shared Hosting • 1 week ago

@rumm.an you are right, I solved that way, thank you.

dohisev left a reply on Laravel.log Could Not Be Opened: Failed To Open Stream: Permission Denied • 1 week ago

I saw that thread and tried to run the commands but most of them the server says invalid user for chown and invalid group for chgrp.

dohisev left a reply on .htaccess On Root Directory To Redirect To Public Folder • 1 week ago

I solved setting the document root on cpanel subdomain configuration and it's working properly, the only problem now is that I'm getting error with permissions saying that can't access the log files. I don't want to set 777 permission because I saw that it's not safe.

dohisev left a reply on Laravel.log Could Not Be Opened: Failed To Open Stream: Permission Denied • 1 week ago

I was reading that 777 isn't safe so that is why I came here to ask you guys about that.

dohisev started a new conversation Laravel.log Could Not Be Opened: Failed To Open Stream: Permission Denied • 1 week ago

I just installed Laravel on a centos server and it doesn't work due the permissions. I was wondering how to solve this?

dohisev left a reply on .htaccess On Root Directory To Redirect To Public Folder • 1 week ago

@alhoqbani How to do that? I'm a real newbie with those hosting things. Is it possible to do that using cpanel?

dohisev left a reply on .htaccess On Root Directory To Redirect To Public Folder • 1 week ago

Ok, I created a subdomain and now I have a folder inside my public_html that is panel I should put your .htaccess code inside the public_html or public_html/panel?

dohisev left a reply on .htaccess On Root Directory To Redirect To Public Folder • 1 week ago

Just a question, you want me to put this on the /public_html/.htaccess? If yes, I can't cause I'm not allowed to change the root .htaccess as there are other projects running in other folders and there are rules in that .htaccess. The .htaccess I sent you was located inside /public_html/panel/.htaccess that would point to /public_html/panel/public.

dohisev left a reply on .htaccess On Root Directory To Redirect To Public Folder • 1 week ago

public_html, but Laravel is currently in a folder called panel so it's public_html/panel

dohisev started a new conversation .htaccess On Root Directory To Redirect To Public Folder • 1 week ago

As I'm in a shared hosting and I can't create a apache virtual host to point to the public folder I tried to use the solution of creating a .htaccess on the root folder to point to the public but it doesn't work, I'm getting an error: Sorry, the page you are looking for could not be found.:

<IfModule mod_rewrite.c>
   RewriteEngine On 
   RewriteRule ^(.*)$ public/ [L]
</IfModule>

How can I solve this? I also trying to get all the files from the public to the root folder but the css and js files are not loading properly using mix.

dohisev left a reply on Laravel On Shared Hosting • 1 week ago

I have now ssh access to the server, it means that I can create an apache virtual host and it should run properly right?

12th November, 2017

dohisev left a reply on Laravel On Shared Hosting • 1 week ago

Anyone? I really need help with this.

dohisev started a new conversation Laravel On Shared Hosting • 1 week ago

I have a shared hosting with ssh access, I managed to install laravel, run npm run prod, but as I can't run the server by php artisan serve I need to make the server to run the php directly so I renamed the server.php file to index.php and put the .htaccess from public to the root folder and it's working but it doesn't find the css and js files that has been generated. I'm using like this: ``` but can't find.

1st November, 2017

dohisev started a new conversation Calling Associate On BelongsTo Doesn't Work • 2 weeks ago

I have a model called ´User´ and another one called `Pl. `Us belongs to a plan meaning that it has the `plan_ column on the `use table. On the model I declared a method:

public function plan()
{
    return $this->belongsTo(Plan::class);
}    

When I register a user I want to set the plan to a free plan, I'm doing like this:

$user = User::create([
    'name' => $data['name'],
    'email' => $data['email'],
    'password' => bcrypt($data['password']),
]);

$plan = Plan::where('slug', 'free')->first();
$user->plan()->associate($plan);

But it's not setting the plan_id column on the database.

It only works if I explicitly set user_id on the User::create method.

How to solve this?

31st October, 2017

dohisev left a reply on Create A Free Plan • 3 weeks ago

Yes, you are right, thank you.

dohisev started a new conversation Create A Free Plan • 3 weeks ago

I created a kind of application with plans and each plan has a price, and of course an expiration date that is based on the date that the user bought that plan + one month, in a few places of the application I show the expiration date and I wanted to create a free plan without an expiration date, instead of the expiration date I would like to display: forever. What would be the best way to determine if a plan is free?

29th October, 2017

dohisev started a new conversation Limit The Pagination Link Amount • 3 weeks ago

I'm using Bootstrap 4 and it seems that the pagination isn't responsive, but even so the amount of links on the current Laravel pagination is way bigger than expected and I was wondering how to make it smaller.

How to make it like:

[<][1][2][...][6][7][>] (example)?

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.