diff --git a/app/Http/Controllers/Auth/SocialAuthController.php b/app/Http/Controllers/Auth/SocialAuthController.php index 0933332..cd1e733 100644 --- a/app/Http/Controllers/Auth/SocialAuthController.php +++ b/app/Http/Controllers/Auth/SocialAuthController.php @@ -58,7 +58,7 @@ private function findOrCreateUser($socialUser) return User::create([ 'name' => $socialUser->getName(), 'email' => $socialUser->getEmail(), - 'provider_id' => $socialUser->getAvatar(), + 'provider_id' => $socialUser->getId(), 'avatar' => $socialUser->getAvatar(), ]); } diff --git a/app/Http/Controllers/CategoryController.php b/app/Http/Controllers/CategoryController.php index 189c7df..1e971af 100644 --- a/app/Http/Controllers/CategoryController.php +++ b/app/Http/Controllers/CategoryController.php @@ -17,10 +17,10 @@ public function __construct() } /** - * Store a newly created resource in storage. + * Store a newly created category in database. * - * @param \Illuminate\Http\Request $request - * @return \Illuminate\Http\Response + * @param Soma\Http\Requests\CategoriesRequest $request + * @return \Illuminate\Routing\Redirector */ public function store(CategoriesRequest $request) { @@ -35,10 +35,10 @@ public function store(CategoriesRequest $request) } /** - * Show the form for editing the specified resource. + * Show the form for editing the category. * * @param int $id - * @return \Illuminate\Http\Response + * @return view */ public function edit($id) { @@ -48,11 +48,11 @@ public function edit($id) } /** - * Update the specified resource in storage. + * Update the category. * - * @param \Illuminate\Http\Request $request + * @param Soma\Http\Requests\CategoriesRequest $request * @param int $id - * @return \Illuminate\Http\Response + * @return \Illuminate\Routing\Redirector */ public function update(CategoriesRequest $request, $id) { @@ -67,10 +67,10 @@ public function update(CategoriesRequest $request, $id) } /** - * Remove the specified resource from storage. + * Delete the category. * * @param int $id - * @return \Illuminate\Http\Response + * @return \Illuminate\Routing\Redirector */ public function destroy($id) { @@ -91,7 +91,7 @@ public function destroy($id) /** * Get the categories of a particular user. * - * @return \Illuminate\Http\Response + * @return view */ public function getCategories() { diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index b5d5148..f688794 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -17,10 +17,10 @@ public function __construct() } /** - * Show the form for editing the specified resource. + * Show the form for editing user profile. * * @param int $id - * @return \Illuminate\Http\Response + * @return view */ public function edit($id) { @@ -30,11 +30,11 @@ public function edit($id) } /** - * Update the specified resource in storage. + * Update user details in database. * - * @param \Illuminate\Http\Request $request + * @param Soma\Http\Requests\ProfileRequest $request * @param int $id - * @return \Illuminate\Http\Response + * @return \Illuminate\Routing\Redirector */ public function update(ProfileRequest $request, $id) { @@ -54,7 +54,7 @@ public function update(ProfileRequest $request, $id) * * @param \Illuminate\Http\Request $request * @param int $id - * @return \Illuminate\Http\Response + * @return void */ public function changeAvatar(Request $request, $id) { diff --git a/app/Http/Controllers/VideoController.php b/app/Http/Controllers/VideoController.php index d8634ed..eeef1c0 100644 --- a/app/Http/Controllers/VideoController.php +++ b/app/Http/Controllers/VideoController.php @@ -4,6 +4,8 @@ use Soma\Videos; use Soma\Categories; +use Illuminate\Http\Request; +use Illuminate\Http\Response; use Soma\Http\Requests\VideoRequest; class VideoController extends Controller @@ -21,15 +23,16 @@ public function __construct() 'index', 'show', 'getVideosByCategory', + 'viewCount', ], ]); $this->getCategories = Categories::all(); } /** - * Display a listing of the resource. + * Paginate all the videos in the database. * - * @return \Illuminate\Http\Response + * @return view */ public function index() { @@ -40,9 +43,9 @@ public function index() } /** - * Show the form for creating a new resource. + * Show the form for uploading a new video. * - * @return \Illuminate\Http\Response + * @return view */ public function create() { @@ -52,48 +55,50 @@ public function create() } /** - * Store a newly created resource in storage. + * Save the video in the database. * - * @param \Illuminate\Http\Request $request - * @return \Illuminate\Http\Response + * @param Soma\Http\Requests\VideoRequest $request + * @return \Illuminate\Routing\Redirector */ public function store(VideoRequest $request) { - $category = Categories::find($request->category_id); + $category = Categories::find($request->category); $link = $this->youtubeEmbedLink($request->youtube_link); + $videoId = $this->getYoutubeId($request->youtube_link); $category->videos()->create([ 'user_id' => auth()->user()->id, 'youtube_link' => $link, + 'youtube_id' => $videoId, 'title' => $request->title, 'description' => $request->description, ]); - flash()->success('Success!', 'You have uploaded a video'); + flash()->success('Success!', 'Video uploaded'); - return redirect()->route('own.videos'); + return redirect()->back(); } /** - * Display the specified resource. + * Get a single video details. * * @param int $id - * @return \Illuminate\Http\Response + * @return view */ public function show($id) { - $video = Videos::find($id); - $category = Categories::find($video->category_id); + $video = Videos::with('category', 'userDirect')->where('id', $id)->first(); + $categories = $this->getCategories; - return view('videos.show', compact('video', 'category')); + return view('videos.show', compact('video', 'categories')); } /** - * Show the form for editing the specified resource. + * Get the for for editing a video. * * @param int $id - * @return \Illuminate\Http\Response + * @return view */ public function edit($id) { @@ -104,18 +109,23 @@ public function edit($id) } /** - * Update the specified resource in storage. + * Update the svideo details in the database. * - * @param \Illuminate\Http\Request $request + * @param Soma\Http\Requests\VideoRequest $request * @param int $id - * @return \Illuminate\Http\Response + * @return \Illuminate\Routing\Redirector */ public function update(VideoRequest $request, $id) { $video = Videos::find($id); + + $link = $this->youtubeEmbedLink($request->youtube_link); + $videoId = $this->getYoutubeId($request->youtube_link); + $video->update([ - 'category_id' => $request->category_id, - 'youtube_link' => $request->youtube_link, + 'category_id' => $request->category, + 'youtube_link' => $link, + 'youtube_id' => $videoId, 'title' => $request->title, 'description' => $request->description, ]); @@ -126,10 +136,10 @@ public function update(VideoRequest $request, $id) } /** - * Remove the specified resource from storage. + * Delete the video from database. * * @param int $id - * @return \Illuminate\Http\Response + * @return \Illuminate\Routing\Redirector */ public function destroy($id) { @@ -147,9 +157,9 @@ public function destroy($id) } /** - * Get the videos of a particular user. + * Get all the videos of a particular user. * - * @return \Illuminate\Http\Response + * @return view */ public function getVideos() { @@ -162,7 +172,7 @@ public function getVideos() /** * Get all the videos of a particular category. * - * @return \Illuminate\Http\Response + * @return view */ public function getVideosByCategory($id) { @@ -172,11 +182,29 @@ public function getVideosByCategory($id) return view('categories.video', compact('videos', 'categories')); } + /** + * Save the number of times a video is viewed. + * + * @param \Illuminate\Http\Request + * @return \Illuminate\Http\Response + */ + public function viewCount(Request $request) + { + if (isset($request->id)) { + $video = Videos::find($request->id); + + $video->play = is_null($video->play) ? 1 : $video->play + 1; + $video->save(); + + return new Response($video->play, 200); + } + } + /** * Write the URL to allow the video to be embedded on page. * * @param string $youtubeLink - * @return \Illuminate\Http\Response + * @return string */ private function youtubeEmbedLink($youtubeLink) { @@ -186,4 +214,18 @@ private function youtubeEmbedLink($youtubeLink) return $url; } + + /** + * Get the youtube id from the submitted url. + * + * @param string $youtubeLink + * @return string + */ + private function getYoutubeId($youtubeLink) + { + $pattern = "/^(?:https?:\/\/)?(?:www\.youtube\.com\/)(?:embed\/|watch\?v=)([\w-]{9,12})(?:.*)$/"; + preg_match($pattern, $youtubeLink, $matches); + + return $matches[1]; + } } diff --git a/app/Http/Flash.php b/app/Http/Flash.php index a30d085..8861b7a 100644 --- a/app/Http/Flash.php +++ b/app/Http/Flash.php @@ -7,6 +7,7 @@ class Flash /** * Create a flash message. * + * Flash is HTTP specific hence no need to inject the Session::store() * @param string $title * @param string $message * @param string $key @@ -14,7 +15,6 @@ class Flash */ public function createFlash($title, $message, $type, $key = 'flash_message') { - // Flash is HTTP specific hence no need to inject the Session::store() session()->flash($key, [ 'title' => $title, 'message' => $message, diff --git a/app/Http/Requests/VideoRequest.php b/app/Http/Requests/VideoRequest.php index 0169e19..c5a430d 100644 --- a/app/Http/Requests/VideoRequest.php +++ b/app/Http/Requests/VideoRequest.php @@ -23,8 +23,9 @@ public function rules() { return [ 'youtube_link' => 'required|url', - 'title' => 'required', + 'title' => 'required|max:30', 'description' => 'required', + 'category' => 'required', ]; } } diff --git a/app/Http/routes.php b/app/Http/routes.php index d9521a1..dbdb0ac 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -10,19 +10,25 @@ | and give it the controller to call when that URI is requested. | */ -// homepage route +/** + * Homepage route. + */ Route::get('/', [ 'uses' => 'VideoController@index', 'as' => 'homepage', ]); -// about page route +/* + * About page route. + */ Route::get('about', [ 'uses' => 'HomeController@about', 'as' => 'aboutpage', ]); -// Authentication routes... +/* + * Traditional Authentication routes. + */ Route::get('auth/login', [ 'uses' => 'HomeController@login', 'as' => 'login', @@ -30,13 +36,11 @@ Route::post('auth/login', 'Auth\AuthController@postLogin'); -// Logout route Route::get('auth/logout', [ 'uses' => 'Auth\AuthController@getLogout', 'as' => 'logout', ]); -// Registration routes... Route::get('auth/register', [ 'uses' => 'HomeController@register', 'as' => 'register', @@ -44,7 +48,9 @@ Route::post('auth/register', 'Auth\AuthController@postRegister'); -// Social authentication routes +/* + * Social authentication routes. + */ Route::get('auth/{provider}', [ 'uses' => 'Auth\SocialAuthController@redirectToProvider', 'as' => 'social.auth', @@ -52,14 +58,18 @@ Route::get('auth/{provider}/callback', 'Auth\SocialAuthController@handleProviderCallback'); -// Dashboard route +/* + * Dashboard route. + */ Route::get('dashboard', [ 'middleware' => 'auth', 'uses' => 'HomeController@dashboard', 'as' => 'dashboard', ]); -// Video route +/* + * Video routes. + */ Route::get('video/myvideos', [ 'uses' => 'VideoController@getVideos', 'as' => 'own.videos', @@ -67,7 +77,9 @@ Route::resource('video', 'VideoController'); -//Category route +/* + * Category routes. + */ Route::get('category/mycategories', [ 'uses' => 'CategoryController@getCategories', 'as' => 'own.categories', @@ -78,7 +90,9 @@ ['except' => ['show', 'index', 'create']] ); -// Profile route +/* + * User profile route. + */ Route::resource( 'profile', 'ProfileController', @@ -87,14 +101,23 @@ ] ); -// change avatar +/* + * Changing user avatar route. + */ Route::post('profile/{id}/photo', [ 'uses' => 'ProfileController@changeAvatar', 'as' => 'change.avatar', ]); -// Get videos by category +/* + * Get videos by category. + */ Route::get('categories/{id}/videos', [ 'uses' => 'VideoController@getVideosByCategory', 'as' => 'category.videos', ]); + +/* + * Post the number of times a video is viewed to database. + */ +Route::post('/views/video', 'VideoController@viewCount'); diff --git a/app/User.php b/app/User.php index 6cffda0..e571bc8 100644 --- a/app/User.php +++ b/app/User.php @@ -64,4 +64,14 @@ public function scopeAuthorizedUser($query, $email) { return $query->where('email', $email); } + + /** + * A user has many videos. + * + * @return Illuminate\Database\Eloquent\Relations\HasMany + */ + public function videosDirect() + { + return $this->hasMany('Soma\Videos'); + } } diff --git a/app/Videos.php b/app/Videos.php index 4c99d29..a851d18 100644 --- a/app/Videos.php +++ b/app/Videos.php @@ -22,8 +22,10 @@ class Videos extends Model 'category_id', 'user_id', 'youtube_link', + 'youtube_id', 'title', 'description', + 'play', ]; /** @@ -35,4 +37,14 @@ public function category() { return $this->belongsTo('Soma\Categories'); } + + /** + * A video belongs to a user. + * + * @return Illuminate\Database\Eloquent\Relations\BelongsTo + */ + public function userDirect() + { + return $this->belongsTo('Soma\User', 'user_id'); + } } diff --git a/build/logs/clover.xml b/build/logs/clover.xml index 81c4370..5281f2c 100644 --- a/build/logs/clover.xml +++ b/build/logs/clover.xml @@ -1,6 +1,6 @@ - - + + @@ -14,21 +14,25 @@ - + - + + + - + - - - + + + + + @@ -134,75 +138,92 @@ - + - - + - - - - - - - - - - - - + + + + + + + + + + + + - + + - - - - - - - - - - - - - - + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -210,7 +231,7 @@ - + @@ -223,7 +244,7 @@ - + @@ -264,7 +285,7 @@ - + @@ -273,7 +294,8 @@ - + + @@ -336,7 +358,8 @@ - + + @@ -359,8 +382,8 @@ - - + + @@ -414,6 +437,6 @@ - + diff --git a/database/migrations/2015_12_20_144836_create_videos_table.php b/database/migrations/2015_12_20_144836_create_videos_table.php index ad217aa..6ec2c1d 100644 --- a/database/migrations/2015_12_20_144836_create_videos_table.php +++ b/database/migrations/2015_12_20_144836_create_videos_table.php @@ -17,8 +17,10 @@ public function up() $table->integer('category_id')->unsigned(); $table->integer('user_id')->unsigned(); $table->string('youtube_link'); + $table->string('youtube_id')->nullable(); $table->string('title'); $table->text('description'); + $table->integer('play')->nullable(); $table->timestamps(); $table->foreign('category_id') diff --git a/public/avatar/large_flower_6080110.JPG b/public/avatar/large_flower_6080110.JPG new file mode 100644 index 0000000..2f111a7 Binary files /dev/null and b/public/avatar/large_flower_6080110.JPG differ diff --git a/public/css/about.css b/public/css/about.css new file mode 100644 index 0000000..496fb76 --- /dev/null +++ b/public/css/about.css @@ -0,0 +1,3 @@ +.sticky-footer .container { + margin-top: 35px; +} \ No newline at end of file diff --git a/public/css/other.css b/public/css/other.css new file mode 100644 index 0000000..8b1c61f --- /dev/null +++ b/public/css/other.css @@ -0,0 +1,3 @@ +.sticky-footer .container { + margin-top: 70px; +} \ No newline at end of file diff --git a/public/css/soma.css b/public/css/soma.css new file mode 100644 index 0000000..57b5b49 --- /dev/null +++ b/public/css/soma.css @@ -0,0 +1,58 @@ +.color-icon { + color: #aa863a; +} + +#mycarousel .carousel-inner .item { + background: url('../image/about2.jpeg') no-repeat left center; + background-size: cover; + height: 300px; +} + +#mycarousel .carousel-inner .item .container .carousel-caption h1 { + color:#aa863a; +} + +.row .form-group button { + margin-top: 20px; +} + +.row .panel table tbody tr td .btn-shape { + border-radius: 30px; + margin-right: 5px; + float: right; + margin-top: 5px; +} + +.row .panel table tbody { + display:block; + max-height: 300px; + overflow: auto; +} + +.row .panel table tbody tr { + display: table; + width: 100%; +} + +.row .edit-box .text-center img { + border: 1px solid #eee; +} + +.row .edit-box { + border-style: ridge; + padding: 8px; +} + +.row .col-sm-10 .text-center img { + border: 1px solid #eee; +} + +.row .col-sm-10 .text-center .photo-size { + width: 200px; + height: 200px; +} + +.row .col-sm-10 #profile { + font-style:oblique; + font-size: 1.5em; +} diff --git a/public/css/style.css b/public/css/style.css index a14de1f..90e9d26 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -41,7 +41,7 @@ } .navbar-color { - background: #7cb342; + background: #2e7d32; } body,html{ @@ -61,7 +61,7 @@ body { footer{ height:70px; margin-top:-70px; - background: #7cb342; + background: #1b5e20; width: 100%; } @@ -95,3 +95,49 @@ footer{ #droplist { width: auto; } + +/* title */ +.navbar-default .navbar-brand { + color: white; +} +.navbar-default .navbar-brand:hover, +.navbar-default .navbar-brand:focus { + color: #d1ffed; +} +/* link */ +.navbar-default .navbar-nav > li > a { + color: white; +} +.navbar-default .navbar-nav > li > a:hover, +.navbar-default .navbar-nav > li > a:focus { + color: #333; +} + +.navbar-default .navbar-nav > .open > a, +.navbar-default .navbar-nav > .open > a:hover, +.navbar-default .navbar-nav > .open > a:focus { + color: #555; + background-color: #D5D5D5; +} +/* caret */ +.navbar-default .navbar-nav > .dropdown > a .caret { + border-top-color: white; + border-bottom-color: white; +} +.navbar-default .navbar-nav > .dropdown > a:hover .caret, +.navbar-default .navbar-nav > .dropdown > a:focus .caret { + border-top-color: #333; + border-bottom-color: #333; +} +.navbar-default .navbar-nav > .open > a .caret, +.navbar-default .navbar-nav > .open > a:hover .caret, +.navbar-default .navbar-nav > .open > a:focus .caret { + border-top-color: #555; + border-bottom-color: #555; +} + +footer .container #footer-text { + margin-top: 15px; + color: white; + opacity: 0.8; +} \ No newline at end of file diff --git a/public/css/video.css b/public/css/video.css index 30cd4f6..5465767 100644 --- a/public/css/video.css +++ b/public/css/video.css @@ -1,6 +1,5 @@ .btn-shape { border-radius: 30px; - margin-right: 10px; } .btn-space { @@ -27,7 +26,7 @@ } #align { - min-height:200px; + min-height:135px; overflow-y: auto; overflow-x:hidden; } @@ -40,21 +39,23 @@ background-color:rgba(0,0,0,0.7); } .list-scrollable { - height: 400px; + max-height: 400px; overflow: auto; } .box-shadow{ border-style:hidden; - box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14),0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12); + box-shadow: 0 8px 8px 0 rgba(0, 0, 0, .14),0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12); } -#single-video{ - max-height: auto; +.embed-responsive-16by9 { + padding-bottom: 51.75%; } #description { color: white; + opacity: 0.9; + word-wrap: break-word; } #back-button { @@ -64,7 +65,53 @@ #video-title { color: #aa863a; } -.vid-thumbnail label h5 { + +.vid-thumbnail { + position: relative; +} + +.vid-thumbnail label h5, .vid-thumbnail #details { opacity: 0.7; color: white; } + +#no-video { + font-size: 7.5em; +} + +#single-no-video { + font-size: 3.5em; +} + +#welcome-no-video { + font-size: 2.5em; +} + +.row .container .vid-thumbnail span { + padding:5px; + color: #aa863a; +} + + +.thumbnail .more { + background-color: #bdbdbd; +} + +.thumbnail .more .row .col-sm-4 h5 { + margin-left: 8px; +} + + +.thumbnail .more .myBtn { + margin-top: 5px; + margin-bottom: 5px; +} + +.thumbnail .more .myBtn .right { + margin-right: 15px; + float: right; +} + +.sticky-footer .container { + margin-top: 70px; +} diff --git a/public/js/dropzone.js b/public/js/dropzone.js new file mode 100644 index 0000000..7e881bb --- /dev/null +++ b/public/js/dropzone.js @@ -0,0 +1,12 @@ +Dropzone.options.changeAvatar = { + paramName: "photo", + maxFilesize: 1, + acceptedFiles: '.jpg, .jpeg, .png, .bmp', + maxFiles: 1, + init: function() { + this.on('maxfilesexceeded', function(file) { + this.removeAllFiles(); + this.addFile(file); + }); + } +}; diff --git a/public/js/soma.js b/public/js/soma.js new file mode 100644 index 0000000..540fe72 --- /dev/null +++ b/public/js/soma.js @@ -0,0 +1,12 @@ +$(function() { + $('#mycarousel').carousel(); + + /* activate the category_add and category modals */ + $(".category-list").click(function(){ + $("#pinside").text($(this).text()); + $("#show-category").modal('show'); + }); + $(".btn-add").click(function(){ + $("#add-category").modal('show'); + }); +}); diff --git a/public/js/youtube.js b/public/js/youtube.js new file mode 100644 index 0000000..8c925a0 --- /dev/null +++ b/public/js/youtube.js @@ -0,0 +1,43 @@ +var tag = document.createElement('script'); + +tag.src = "https://www.youtube.com/iframe_api"; +var scriptTag = document.getElementsByTagName('script')[0]; +scriptTag.parentNode.insertBefore(tag, scriptTag); + +var player; +function onYouTubeIframeAPIReady() { + player = new YT.Player('player', { + events: { + 'onStateChange': onPlayerStateChange + } + }); +} + +var count = 0; +function onPlayerStateChange(event) { + if (event.data == YT.PlayerState.PLAYING && count == 0) { + var pathname = window.location.pathname; + var match = pathname.match(/(?:\/video\/)(\w+)/); + var id = match[1]; + + $.ajaxSetup({ + headers: { + 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') + } + }); + + $.ajax({ + method: "POST", + url: "/views/video", + data: {id: id}, + success: function(resp) { + console.log(resp); + $("#count").html(resp + ' Views'); + }, + error: function(exception) { + console.log(exception); + } + }); + count++; + } +} diff --git a/readme.md b/readme.md index fa377f9..f609b13 100644 --- a/readme.md +++ b/readme.md @@ -1,27 +1,27 @@ # soma-tech -![CircleCI Badge](https://circleci.com/gh/andela-sachungo/soma-tech.svg?style=shield&circle-token=eab6015ece8c084d689495dcbbf2bd5bd22c50cb) +[![CircleCI Badge](https://circleci.com/gh/andela-sachungo/soma-tech.svg?style=shield&circle-token=eab6015ece8c084d689495dcbbf2bd5bd22c50cb)](https://circleci.com/gh/andela-sachungo/soma-tech/75) [![Coverage Status](https://coveralls.io/repos/andela-sachungo/soma-tech/badge.svg?branch=master&service=github)](https://coveralls.io/github/andela-sachungo/soma-tech?branch=master) -![StyleCI Badge](https://styleci.io/repos/48097337/shield) +[![StyleCI Badge](https://styleci.io/repos/48097337/shield)](https://styleci.io/repos/48097337) -Soma-tech is a learning management system that helps people learn various technologies. - -**NOTE:** It is highly recommended that you use [Homestead virtual machine](http://laravel.com/docs/5.1/homestead). +Soma-tech is a learning management system that helps people learn various technologies. You can upload YouTube videos by category, edit and delete them. You have to log in first before uploading or changing a video from your dashboard. To view the project and play with it, [visit this page](http://soma-tech.herokuapp.com/). ##Installation instructions * Clone the repository `git clone ` * Run `composer install` * Rename `.env.example` to `.env` -* Run `php artisan key:generate` to generate the *application key* +* Run `php artisan key:generate` to generate the *application key*. + +**NOTE:** It is highly recommended that you use [Homestead virtual machine](http://laravel.com/docs/5.1/homestead). ##Defining the site in Homestead -[Laravel](http://laravel.com/docs/5.1/homestead#connecting-via-ssh) explains how to configure **Homestead**. +[Laravel Documentation](http://laravel.com/docs/5.1/homestead#connecting-via-ssh) explains how to configure **Homestead**. In summary: - 1. Identify which folder(s) you want to share with Homestead as - explained in [Configuring Shared Folders](http://laravel.com/docs/5.1/homestead#configuring-homestead). - 2. Map a domain to a folder on your Homestead environment as explained in [Configuring Nginx Sites](http://laravel.com/docs/5.1/homestead#configuring-homestead). - 3. Then add the domain to your Nginx site to the `hosts` file on your machine, as explained in [The Hosts File](http://laravel.com/docs/5.1/homestead#configuring-homestead). + 1. Identify which directory(s) you want to share with Homestead as + explained in [Configuring Shared Folders section](http://laravel.com/docs/5.1/homestead#configuring-homestead). + 2. Map a domain to a directory on your Homestead environment as explained in [Configuring Nginx Sites section](http://laravel.com/docs/5.1/homestead#configuring-homestead). + 3. Then add the domain to your Nginx site to the `hosts` file on your machine, as explained in [the Hosts File section](http://laravel.com/docs/5.1/homestead#configuring-homestead). 4. Run the `vagrant up` command from your Homestead directory. **NOTE:** When your Homestead environment is provisioned and running, to add an additional Nginx site ; add it on `Homestead.yaml` file and then run `vagrant provision`. diff --git a/resources/views/about/about.blade.php b/resources/views/about/about.blade.php index 0f67548..2399ce7 100644 --- a/resources/views/about/about.blade.php +++ b/resources/views/about/about.blade.php @@ -1,34 +1,20 @@ - - - - - - - - - @extends('layouts.master') @section('title', 'About') @section('styles') - + + @endsection @section('content')