Laravel 5 – Remove Public from URL

Rename server.php in your Laravel root folder to index.php
Copy the .htaccess file from /public directory to your Laravel root folder.

AND Protect your env file:

 

<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>

RewriteEngine On

# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

# Redirect Trailing Slashes If Not A Folder…
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]

# Handle Front Controller…
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

#Added env protect
RewriteCond %{THE_REQUEST} ^.*/\.
RewriteRule ^(.*)$ – [R=404]

</IfModule>

 

More info

https://stackoverflow.com/questions/28364496/laravel-5-remove-public-from-url

+++

Laravel 5 change public_path()

public/ index.php :

$app->bind(‘path.public’, function() {
return __DIR__.’/../’;
});

(My uploads folder in application root/uploads )

Laravel and Sass

Laravel from Scratch #3 – Compile SASS with Laravel Mix

npm install

npm install -g cross-env

npm run watch

_hero.scss

video: 13:38

How to use SASS to create new set of color styles in Bootstrap 4 ?

https://www.geeksforgeeks.org/how-to-use-sass-to-create-new-set-of-color-styles-in-bootstrap-4/

How to create new set of color styles in Bootstrap 4 with sass

https://stackoverflow.com/questions/39382588/how-to-create-new-set-of-color-styles-in-bootstrap-4-with-sass

https://www.codeply.com/go/7qDwaKnBzc/bootstrap-4-sass-add-custom-color

Laravel Vue.js Auction site development /PHP Laravel 5.8, Vue.js, MySQL

Here is the Demo site: https://blogbook.hu/laravel_auction4/public/

VueJs and PHP Laravel 5.8 Auction is an E-Commerce multi-vendor program.
This is a PHP Laravel based software that let users sell goods or bid on other products after registration.

Server Requirements: PHP >= 7.1.3, MySQL, Apache webserver, .htaccess enabled.
The program is also working on shared hosting.

Vendors/sellers can create their own account, product, specify their own currency, upload product images.
User (vendor) can set the opening price, buy now price, currency, category.
User (vendor) can add 10 photos of the product by dragging on the page.
SuperAdmin user can moderate the auction and has full control of user, bid, auction.
Registered user (vendor) can create auction or bid auction.
Multi-Languages

TODO list: I have to solve the multi-lang in the Vue.js Under development

Vue.js VueI18n – Laravel Vue lang

It has the ability to send Laravel json translation files to the front end through a Artisan command.

laravel-vue-i18n-generator https://github.com/martinlindhe/laravel-vue-i18n-generator

https://kazupon.github.io/vue-i18n/started.html#html

Implementing i18n in Vue.js Using vue-i18n

https://alligator.io/vuejs/vue-with-i18n/

Localization with Laravel and VueJS

https://medium.com/@konafets/localization-with-laravel-and-vuejs-e27068e68ee8

How to Add Internationalization to a Vue App

https://dev.to/ratracegrad/how-to-add-internationalization-to-a-vue-app-8ng

Run artisan commands on shared hosting server (Laravel)

+ TODO delete logs shared hosting

1. Open the web.php file which is in the “route” folder of your project and paste the below code.
//Clear configurations:
Route::get(‘/config-clear’, function() {
$status = Artisan::call(‘config:clear’);
return ‘<h1>Configurations cleared</h1>’;
});

//Clear cache:
Route::get(‘/cache-clear’, function() {
$status = Artisan::call(‘cache:clear’);
return ‘<h1>Cache cleared</h1>’;
});

//Clear configuration cache:
Route::get(‘/config-cache’, function() {
$status = Artisan::call(‘config:Cache’);
return ‘<h1>Configurations cache cleared</h1>’;

 

https://blog.webnersolutions.com/run-artisan-commands-on-shared-hosting-server-laravel/

Laravel Mail with Gmail and Mailtrap

youremail@gmail.com:

UNLOCK lINKS

https://myaccount.google.com/security

https://myaccount.google.com/lesssecureapps

https://accounts.google.com/b/0/DisplayUnlockCaptcha

ERROR solution: https://stackoverflow.com/questions/33939393/failed-to-authenticate-on-smtp-server-error-using-gmail

FOR LOCAL DEVELOPMENT: MAiltrap:

https://medium.com/@christianjombo/setting-up-mailtrap-for-laravel-development-313133bb800c

https://mailtrap.io/inboxes/614146/messages