tumainimosha / laravel-coming-soon
Simple Comming Soon page
Installs: 1 043
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 1
Forks: 4
Open Issues: 0
Requires
- php: >=7.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.13
- orchestra/testbench: ~3.7.0
- phpunit/phpunit: ^7.0
README
A straightforward Coming Soon package for Laravel with Countdown timer and Email capture.
Just Install the package, configure .env and you are ready to go!
Installation
- Install using composer
composer require tumainimosha/laravel-coming-soon
- After Installation run this command to publish assets
php artisan vendor:publish --provider="snw\\ComingSoon\\ComingSoonServiceProvider" --tag="assets"
- Add Coming Soon route to your route file
Option (a) As the home route. Users will see this as landing page for yourdomain.com
.
// file: routes/web.php Route::get('/', function () { return view('comingsoon::comingsoon'); });
Option (b). As default route. Users will see this when trying to access any URL on your site
// file: routes/web.php Route::any('{query}', function () { return view('comingsoon::comingsoon'); })->where('query', '.*');
If you want to display the Email form
Publish the migrations
php artisan vendor:publish --provider="snw\\ComingSoon\\ComingSoonServiceProvider" --tag="migrations"
Then run
php artisan migrate
This will create a coming_soons
table containing list of email of visitors to the site
.env values
You will have to add the following to your .env
and set values accordingly
- OFFLINE_ENABLE= {true/false} (Enable Coming Soon page)
- OFFLINE_SHOW_EMAIL_FORM= {true/false} (Display the Email form)
- OFFLINE_SEND_EMAIL_TO= {info@softnweb.in}
- OFFLINE_YEAR= {2018} (Countdown year)
- OFFLINE_MONTH= {12} (Countdown month)
- OFFLINE_DAY= {1} (Countdown day)
- OFFLINE_HOURS= {1} (Countdown hours)
- OFFLINE_MINUTES= {60} (Countdown minutes)
- OFFLINE_SECONDS= {60} (Countdown seconds)
- OFFLINE_FACEBOOK= {http://facebook.com/softnweb}
- OFFLINE_INSTAGRAM= {#}
- OFFLINE_GITHUB= {#}
- OFFLINE_MAIL= {info@softnweb.in}
Security
If you discover any security related issues, please email Me instead of using the issue tracker.
Credits
This package is forked SoftNWeb/laravel-coming-soon package