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
echo "Welcome to Easy Ubuntu Dev Setup 1.0" | |
echo -e "Maintained By SUST CSE Developer Network (SCDN)\n" | |
echo "Steap:1 [System Update]" | |
echo "Update Starts....." | |
sudo apt-get update | |
echo -e "System Update Completed Successfully\n" | |
echo "Step:2 [Install Apache2]" | |
sudo apt-get install apache2 |
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/jarektkaczyk/eloquence | |
..................... | |
Composer | |
...................... | |
https://github.com/jarektkaczyk/eloquence/wiki/Installation | |
"require": { | |
// OR | |
"sofa/eloquence": "~5.1", // for Laravel 5.1.* |
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
ssh: Could not resolve hostname github.com: Temporary failure in name resolution | |
fatal: The remote end hung up unexpectedly | |
Solution: | |
service httpd restart | |
service network restart |
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
public function create() | |
{ | |
$state_id = States::pluck('name','id'); | |
$cities = ['Please select state first']; | |
$venue_type = VenueType::pluck('name', 'id'); | |
return view('venue.create', compact('venue_type','state_id','cities'))->with('title', "Create New Venue "); | |
} | |
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
Route::get ( '/', function () { | |
if (($handle = fopen ( public_path () . '/MOCK_DATA.csv', 'r' )) !== FALSE) { | |
while ( ($data = fgetcsv ( $handle, 1000, ',' )) !== FALSE ) { | |
$csv_data = new Csvdata (); | |
$csv_data->id = $data [0]; | |
$csv_data->firstname = $data [1]; | |
$csv_data->lastname = $data [2]; | |
$csv_data->email = $data [3]; | |
$csv_data->gender = $data [4]; |
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
dpkg --purge phpmyadmin | |
dpkg --purge mysql-server | |
dpkg --purge apache2.2-common | |
or | |
sudo apt-get remove apache2* | |
sudo apt-get remove phpmyadmin | |
sudo apt-get remove mysql-server | |
sudo apt-get remove php5 |
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
Simply you can do: | |
...................... | |
$random_question = Question::orderBy(DB::raw('RAND()'))->take(1)->get(); | |
If you want to use the syntax as you specified in your question, you can use scopes. In the model Question you can add the following method: | |
public function scopeTakeRandom($query, $size=1) | |
{ |
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
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/css/select2.min.css" rel="stylesheet" /> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js"></script> | |
jQuery(document).ready(function() { | |
$(".select2").select2({ | |
width: '100%', | |
theme: "classic" | |
}); | |
}); |
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://www.sitepoint.com/community/t/need-a-simple-popup-modal-on-page-load-with-time-delay-fast-clean/36860/2 | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title>ColorBox demo</title> | |
<link rel="stylesheet" href="http://www.jacklmoore.com/colorbox/example1/colorbox.css" /> |