This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##Install Apache, MySQL, PHP on Linux generally called LAMP which needs to install together to host websites and dynamic web applications on server. Where Linux is operating system, Apache is web server, MySQL is database and content is processed with PHP scripting language. | |
sudo apt-get update | |
sudo apt-get install apache2 | |
##Enable Required apache2 modes | |
sudo a2enmod headers proxy_http xml2enc proxy ssl proxy_wstunnel rewrite |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Open Ports on AWS | |
1->First Allow All TCP rules from anywhere | |
2->and Open port 80 | |
//Now port forwading | |
1->sudo vim /etc/systctl.conf ==>enter | |
2->uncomment net.ipv4.ip_forward = 1 //line 28 | |
3->save | |
1->sudo sysctl -p /etc/sysctl.conf // for activate the changes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Check if mod rewrite is enabled - sudo a2enmod rewrite | |
Give permissions to your storage and vendor folders - chmod 755 -R laravel and then chmod -R o+w storage | |
Check if you app.config has the environment variables set correctly including the 'url' . Set it to point to the right URL. | |
If you are using database ensure that you have your database.config set to the correct database for e.g. mysql. Set the database, user id and password | |
Go to /etc/apache2/sites-available/ and change your Document root to point to your Laravel public folder. (the one where you have your project installed) | |
Go to /etc/apache2 and use either of mcedit/vi/nano apache.conf and make the following modifications to /var/www/, you may also want to add this as an additional entry Assuming this is your DocumentRoot "/var/www/html/laravel/public/" <Directory "/var/www/html/laravel/public"> Allowoverride All Require all granted | |
Restart your apache-> apachectl restart or use a command that you find to handy. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -O https://getcomposer.org/composer.phar | |
mv composer.phar composer | |
chmod +x composer | |
sudo mv composer /usr/local/bin | |
composer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/topics/laravel-admin-panel |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return [ | |
'Andhra Pradesh (AP)'=>[ | |
'Adilabad', | |
'Anantapur', | |
'Chittoor', | |
'Kakinada', | |
'Guntur', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require( 'express' ), | |
bodyParser = require( 'body-parser' ), | |
pjax = require( './pjax-helper' ); | |
var app = express(); | |
app.set( 'views', __dirname + '/views' ); | |
app.set( 'view engine', 'jade' ); | |
app.use( pjax() ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hooks : { | |
beforeCreate : (record, options) => { | |
record.dataValues.createdAt = Math.floor(Date.now() / 1000); | |
record.dataValues.updatedAt = Math.floor(Date.now() / 1000); | |
}, | |
beforeUpdate : (record, options) => { | |
record.dataValues.updatedAt = Math.floor(Date.now() / 1000); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.get('/*', function(req,res,next) { | |
req.session.flash = []; | |
next(); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var values="Test,Prof,Off"; | |
$.each(values.split(","), function(i,e){ | |
$("#strings option[value='" + e + "']").prop("selected", true); | |
}); |