adr1enbe4udou1n / laravel-boilerplate

Laravel 5.7 Boilerplate based on Bootstrap 4 and Vue Tabler for Backend.
https://laravel-boilerplate.okami101.io
MIT License
260 stars 107 forks source link

Can you make the code without using the JSON data type? #98

Closed Limych closed 5 years ago

Limych commented 5 years ago

I found that in the code there is a JSON database data type, which appeared only in MySQL 5.7.2.

Unfortunately, the vast majority of the leading hosting providers in our country provides MySQL no higher than version 5.6. As a result, when we try to use your boilerplate, we get a fatal error.

Is this type of data so needed? Is it possible to rewrite the boilerplate so that only the data types available in MySQL 5.6 are used?

shirshak55 commented 5 years ago

Hello, This is really good question and most frequently asked one too.

The thing is this boilerplate directly don't care about which database we use. The dependencies are the one which requires json database type. Mainly if you check spatie packages are the one which require it.

If we don't use those packages we would need to maintain it and it is really problematic .

And by the way which hosting do you use. I think laravel app are usually installed in VPS so you can choose to install mysql 8 also if you like :) I don't think shared hosting is good for laravel. I think heroku is supported out of box also .

IHMO I think json is needed because if your app gets larger I think directly or indirectly we will need it :)

Limych commented 5 years ago

Unfortunately, I currently do not have the option to choose which hosting provider to use. The project is done on growth and eventually, of course, will have its own server (VPS or dedicated). For now, we have to use only cheap hosting.

Therefore, it makes no sense to use a weak engine, but there is no way to use powerful hosting yet.

shirshak55 commented 5 years ago

these days dedicated host is nearly same. check vultr

On Mon, Sep 24, 2018, 3:58 PM Limych notifications@github.com wrote:

Unfortunately, I currently do not have the option to choose which hosting provider to use. The project is done on growth and eventually, of course, will have its own server (VPS or dedicated). For now, we have to use only cheap hosting.

Therefore, it makes no sense to use a weak engine, but there is no way to use powerful hosting yet.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/adr1enbe4udou1n/laravel-boilerplate/issues/98#issuecomment-423929254, or mute the thread https://github.com/notifications/unsubscribe-auth/AHuOYRENHCr8sge9CuGO_A3qGALv4aihks5ueLA5gaJpZM4W2NhL .

Limych commented 5 years ago

these days dedicated host is nearly same. check vultr

Same, but not same. There are big differences in legal status of server and physical security of server data.

adr1enbe4udou1n commented 5 years ago

Hello,

Sorry Limych but I'm can't support all hosting providers. If you dont want have to manage a VPS and use this boilerplate, the "simplest" way is to follow this steps :

  1. Migrate 'slug' column (there is only 'post' table to move i think) to a separate localized table (or just change column type to string if you dont need multilanguage)
  2. Use eventually this sluggable package
  3. Replace HasTranslatableSlug trait by the previous sluggable trait package and readapt code.

This his pretty doable on few hours.

shirshak55 commented 5 years ago

If you need any help regarding it we are ready :)