└── cms ├── .editorconfig ├── .env.example ├── .gitattributes ├── .gitignore ├── app ├── Console │ └── Kernel.php ├── Exceptions │ └── Handler.php ├── Http │ ├── Controllers │ │ ├── Auth │ │ │ ├── ForgotPasswordController.php │ │ │ ├── LoginController.php │ │ │ ├── RegisterController.php │ │ │ ├── ResetPasswordController.php │ │ │ └── VerificationController.php │ │ ├── Blog │ │ │ └── PostsController.php │ │ ├── CategoriesController.php │ │ ├── Controller.php │ │ ├── HomeController.php │ │ ├── PostsController.php │ │ ├── TagsController.php │ │ ├── UsersController.php │ │ └── WelcomController.php │ ├── Kernel.php │ ├── Middleware │ │ ├── Authenticate.php │ │ ├── CheckForMaintenanceMode.php │ │ ├── EncryptCookies.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── TrimStrings.php │ │ ├── TrustProxies.php │ │ ├── VerifyCategoriesCount.php │ │ ├── VerifyCsrfToken.php │ │ └── verifyIsAdmin.php │ └── Requests │ │ ├── Categories │ │ ├── CreateCategoryRequest.php │ │ └── UpdateCategoriesRequest.php │ │ ├── Tags │ │ ├── CreateTagRequest.php │ │ └── UpdateTagsRequest.php │ │ ├── Users │ │ └── UpdateProfileRequest.php │ │ └── posts │ │ ├── CreatePostsRequest.php │ │ └── UpdatePostRequest.php ├── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── Tag.php ├── User.php ├── category.php └── post.php ├── artisan ├── bootstrap ├── app.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── database.php ├── filesystems.php ├── hashing.php ├── logging.php ├── mail.php ├── queue.php ├── services.php ├── session.php └── view.php ├── database ├── .gitignore ├── factories │ └── UserFactory.php ├── migrations │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2014_10_12_100000_create_password_resets_table.php │ ├── 2020_04_05_162508_create_categories_table.php │ ├── 2020_04_26_120252_create_tags_table.php │ ├── 2020_04_26_195800_create_post_tag_table.php │ ├── 2020_04_27_162329_create_posts_table.php │ └── 2020_04_28_122643_add_soft_delete_to_posts_table.php └── seeds │ ├── DatabaseSeeder.php │ ├── PostTableSeeder.php │ └── UsersTableSeeder.php ├── package.json ├── phpunit.xml ├── public ├── .htaccess ├── css │ ├── app.css │ ├── page.min.css │ └── style.css ├── favicon.ico ├── fonts │ ├── FontAwesome.otf │ ├── et-line.eot │ ├── et-line.svg │ ├── et-line.ttf │ ├── et-line.woff │ ├── fa-brands-400.eot │ ├── fa-brands-400.svg │ ├── fa-brands-400.ttf │ ├── fa-brands-400.woff │ ├── fa-brands-400.woff2 │ ├── fa-regular-400.eot │ ├── fa-regular-400.svg │ ├── fa-regular-400.ttf │ ├── fa-regular-400.woff │ ├── fa-regular-400.woff2 │ ├── fa-solid-900.eot │ ├── fa-solid-900.svg │ ├── fa-solid-900.ttf │ ├── fa-solid-900.woff │ ├── fa-solid-900.woff2 │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.svg │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ ├── fontawesome-webfont.woff2 │ ├── themify.eot │ ├── themify.svg │ ├── themify.ttf │ └── themify.woff ├── img │ ├── apple-touch-icon.png │ ├── favicon.png │ ├── logo-dark.png │ └── logo-light.png ├── index.php ├── js │ ├── app.js │ ├── page.min.js │ └── script.js ├── robots.txt └── web.config ├── readme.md ├── resources ├── js │ ├── app.js │ ├── bootstrap.js │ └── components │ │ └── ExampleComponent.vue ├── lang │ └── en │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php ├── sass │ ├── _variables.scss │ └── app.scss └── views │ ├── auth │ ├── login.blade.php │ ├── passwords │ │ ├── email.blade.php │ │ └── reset.blade.php │ ├── register.blade.php │ └── verify.blade.php │ ├── blog │ ├── category.blade.php │ ├── show.blade.php │ └── tag.blade.php │ ├── categories │ ├── create.blade.php │ └── index.blade.php │ ├── home.blade.php │ ├── layouts │ ├── app.blade.php │ └── blog.blade.php │ ├── partials │ ├── errors.blade.php │ └── sidebar.blade.php │ ├── posts │ ├── create.blade.php │ └── index.blade.php │ ├── tags │ ├── create.blade.php │ └── index.blade.php │ ├── users │ ├── edit.blade.php │ └── index.blade.php │ ├── vendor │ └── pagination │ │ ├── bootstrap-4.blade.php │ │ ├── default.blade.php │ │ ├── semantic-ui.blade.php │ │ ├── simple-bootstrap-4.blade.php │ │ └── simple-default.blade.php │ └── welcome.blade.php ├── routes ├── api.php ├── channels.php ├── console.php └── web.php ├── server.php ├── storage ├── app │ ├── .gitignore │ └── public │ │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ ├── .gitignore │ │ └── data │ │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore ├── tests ├── CreatesApplication.php ├── Feature │ └── ExampleTest.php ├── TestCase.php └── Unit │ └── ExampleTest.php └── webpack.mix.js /cms/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | indent_style = space 8 | indent_size = 4 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.yml] 15 | indent_size = 2 16 | -------------------------------------------------------------------------------- /cms/.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_URL=http://localhost 6 | 7 | LOG_CHANNEL=stack 8 | 9 | DB_CONNECTION=mysql 10 | DB_HOST=127.0.0.1 11 | DB_PORT=3306 12 | DB_DATABASE=homestead 13 | DB_USERNAME=homestead 14 | DB_PASSWORD=secret 15 | 16 | BROADCAST_DRIVER=log 17 | CACHE_DRIVER=file 18 | QUEUE_CONNECTION=sync 19 | SESSION_DRIVER=file 20 | SESSION_LIFETIME=120 21 | 22 | REDIS_HOST=127.0.0.1 23 | REDIS_PASSWORD=null 24 | REDIS_PORT=6379 25 | 26 | MAIL_DRIVER=smtp 27 | MAIL_HOST=smtp.mailtrap.io 28 | MAIL_PORT=2525 29 | MAIL_USERNAME=null 30 | MAIL_PASSWORD=null 31 | MAIL_ENCRYPTION=null 32 | 33 | AWS_ACCESS_KEY_ID= 34 | AWS_SECRET_ACCESS_KEY= 35 | 36 | PUSHER_APP_ID= 37 | PUSHER_APP_KEY= 38 | PUSHER_APP_SECRET= 39 | PUSHER_APP_CLUSTER=mt1 40 | 41 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 42 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 43 | -------------------------------------------------------------------------------- /cms/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | *.js linguist-vendored 5 | CHANGELOG.md export-ignore 6 | -------------------------------------------------------------------------------- /cms/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /public/hot 3 | /public/storage 4 | /storage/*.key 5 | /vendor 6 | .env 7 | .phpunit.result.cache 8 | Homestead.json 9 | Homestead.yaml 10 | npm-debug.log 11 | yarn-error.log 12 | /theme -------------------------------------------------------------------------------- /cms/app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire') 28 | // ->hourly(); 29 | } 30 | 31 | /** 32 | * Register the commands for the application. 33 | * 34 | * @return void 35 | */ 36 | protected function commands() 37 | { 38 | $this->load(__DIR__.'/Commands'); 39 | 40 | require base_path('routes/console.php'); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /cms/app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /cms/app/Http/Controllers/Auth/LoginController.php: -------------------------------------------------------------------------------- 1 | middleware('guest')->except('logout'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /cms/app/Http/Controllers/Auth/RegisterController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 41 | } 42 | 43 | /** 44 | * Get a validator for an incoming registration request. 45 | * 46 | * @param array $data 47 | * @return \Illuminate\Contracts\Validation\Validator 48 | */ 49 | protected function validator(array $data) 50 | { 51 | return Validator::make($data, [ 52 | 'name' => ['required', 'string', 'max:255'], 53 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 54 | 'password' => ['required', 'string', 'min:8', 'confirmed'], 55 | ]); 56 | } 57 | 58 | /** 59 | * Create a new user instance after a valid registration. 60 | * 61 | * @param array $data 62 | * @return \App\User 63 | */ 64 | protected function create(array $data) 65 | { 66 | return User::create([ 67 | 'name' => $data['name'], 68 | 'email' => $data['email'], 69 | 'password' => Hash::make($data['password']), 70 | ]); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /cms/app/Http/Controllers/Auth/ResetPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /cms/app/Http/Controllers/Auth/VerificationController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 38 | $this->middleware('signed')->only('verify'); 39 | $this->middleware('throttle:6,1')->only('verify', 'resend'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /cms/app/Http/Controllers/Blog/PostsController.php: -------------------------------------------------------------------------------- 1 | with('post', $post); 20 | } 21 | 22 | public function category(Category $category) 23 | { 24 | // $search = request()->query('search'); 25 | 26 | // if ($search) { 27 | // $posts = $category->posts()->where('title', 'LIKE', "%($search)%")->simplePaginate(2); 28 | // } else { 29 | // $posts = $category->posts()->simplePaginate(2); 30 | // } 31 | 32 | 33 | return view('blog.category') 34 | ->with('category', $category) 35 | ->with('posts', $category->posts()->searched()->simplePaginate(2)) 36 | ->with('categories', Category::all()) 37 | ->with('tags', Tag::all()); 38 | } 39 | 40 | public function tag (Tag $tag) 41 | { 42 | return view ('blog.tag') 43 | ->with('tag',$tag) 44 | ->with('categories', Category::all()) 45 | ->with('tags', Tag::all()) 46 | ->with('posts', $tag->posts()->searched()->simplePaginate(2)); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /cms/app/Http/Controllers/CategoriesController.php: -------------------------------------------------------------------------------- 1 | with('categories', Category::all()); 23 | } 24 | 25 | /** 26 | * Show the form for creating a new resource. 27 | * 28 | * @return \Illuminate\Http\Response 29 | */ 30 | public function create() 31 | { 32 | return view ('categories.create'); 33 | } 34 | 35 | /** 36 | * Store a newly created resource in storage. 37 | * 38 | * @param \Illuminate\Http\Request $request 39 | * @return \Illuminate\Http\Response 40 | */ 41 | public function store(CreateCategoryRequest $request) 42 | { 43 | $this->validate($request, [ 44 | 'name'=> 'required|unique:categories' 45 | ]); 46 | 47 | Category::create([ 48 | 49 | 'name'=> $request->name 50 | ]); 51 | 52 | session()->flash('success', 'category created successfully.'); 53 | 54 | return redirect(route('categories.index')); 55 | } 56 | 57 | /** 58 | * Display the specified resource. 59 | * 60 | * @param int $id 61 | * @return \Illuminate\Http\Response 62 | */ 63 | public function show($id) 64 | { 65 | // 66 | } 67 | 68 | /** 69 | * Show the form for editing the specified resource. 70 | * 71 | * @param int $id 72 | * @return \Illuminate\Http\Response 73 | */ 74 | public function edit(Category $category) 75 | { 76 | return view('categories.create')->with('category', $category); 77 | } 78 | 79 | /** 80 | * Update the specified resource in storage. 81 | * 82 | * @param \Illuminate\Http\Request $request 83 | * @param int $id 84 | * @return \Illuminate\Http\Response 85 | */ 86 | public function update(UpdateCategoriesRequest $request, category $category) 87 | { 88 | // $category->name = $request->name; 89 | $category->update([ 90 | 91 | 'name'=> $request->name 92 | ]); 93 | 94 | 95 | session()->flash('success', 'Category updated successfully'); 96 | 97 | return redirect(route('categories.index')); 98 | } 99 | 100 | /** 101 | * Remove the specified resource from storage. 102 | * 103 | * @param int $id 104 | * @return \Illuminate\Http\Response 105 | */ 106 | public function destroy(Category $category) 107 | { 108 | if ($category->posts->count()>0) { 109 | 110 | session()->flash('error', 'Category cannot be deleted because it has some posts'); 111 | 112 | return redirect()->back(); 113 | } 114 | 115 | $category->delete(); 116 | 117 | session()->flash('success', 'Category deleted successfully'); 118 | 119 | return redirect(route('categories.index')); 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /cms/app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 17 | } 18 | 19 | /** 20 | * Show the application dashboard. 21 | * 22 | * @return \Illuminate\Contracts\Support\Renderable 23 | */ 24 | public function index() 25 | { 26 | return view('home'); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /cms/app/Http/Controllers/PostsController.php: -------------------------------------------------------------------------------- 1 | middleware('verifyCategoriesCount')->only(['create', 'store']); 32 | $this->middleware('verifyCategoriesCount')->only(['create', 'store']); 33 | } 34 | 35 | /** 36 | * Display a listing of the resource. 37 | * 38 | * @return \Illuminate\Http\Response 39 | */ 40 | public function index() 41 | { 42 | return view('posts.index')->with('posts', Post::all()); 43 | } 44 | 45 | /** 46 | * Show the form for creating a new resource. 47 | * 48 | * @return \Illuminate\Http\Response 49 | */ 50 | public function create() 51 | { 52 | return view('posts.create')->with('categories', Category::all())->with('tags', Tag::all()); 53 | } 54 | 55 | /** 56 | * Store a newly created resource in storage. 57 | * 58 | * @param \Illuminate\Http\Request $request 59 | * @return \Illuminate\Http\Response 60 | */ 61 | public function store(CreatePostsRequest $request) 62 | { 63 | // dd($request->all()); 64 | // dd($request->image->store('posts')); 65 | //upload the image to storage 66 | $image = $request->image->store('posts'); 67 | 68 | //create the post 69 | $post = Post::create([ 70 | 71 | 'title' => $request->title, 72 | 73 | 'description' => $request->description, 74 | 75 | 'content' => $request->content, 76 | 77 | 'image' => $image, 78 | 79 | 'published_at' => $request->published_at, 80 | 81 | 'category_id' => $request->category, 82 | 83 | 'user_id' => auth()->user()->id 84 | ]); 85 | 86 | if ($request->tags) { 87 | 88 | $post->tags()->attach($request->tags); 89 | } 90 | 91 | 92 | //flash message 93 | 94 | session()->flash('success', 'Post created successfully.'); 95 | 96 | //redirect user 97 | return redirect(route('posts.index')); 98 | 99 | } 100 | 101 | /** 102 | * Display the specified resource. 103 | * 104 | * @param int $id 105 | * @return \Illuminate\Http\Response 106 | */ 107 | public function show($id) 108 | { 109 | // 110 | } 111 | 112 | /** 113 | * Show the form for editing the specified resource. 114 | * 115 | * @param int $id 116 | * @return \Illuminate\Http\Response 117 | */ 118 | public function edit(Post $post) 119 | { 120 | // dd($post->tags->pluck('id')->toArray()); 121 | return view('posts.create')->with('post', $post)->with('categories', Category::all())->with('tags', Tag::all()); 122 | } 123 | 124 | /** 125 | * Update the specified resource in storage. 126 | * 127 | * @param \Illuminate\Http\Request $request 128 | * @param int $id 129 | * @return \Illuminate\Http\Response 130 | */ 131 | public function update(UpdatePostRequest $request, Post $post) 132 | { 133 | $data = $request->only(['title', 'description', 'published_at', 'content']); 134 | //check new image 135 | if($request->hasFile('image')){ 136 | 137 | //Upload it 138 | $image = $request->image->store('posts'); 139 | 140 | //delete old image 141 | $post->deleteImage(); 142 | 143 | $data['image'] = $image; 144 | 145 | } 146 | 147 | if ($request->tags) { 148 | 149 | $post->tags()->sync($request->tags); 150 | } 151 | 152 | //update attributes 153 | $post->update($data); 154 | 155 | //flash message 156 | session()->flash('success', 'Post updated successfully'); 157 | 158 | //redirect user 159 | return redirect(route('posts.index')); 160 | } 161 | 162 | /** 163 | * Remove the specified resource from storage. 164 | * 165 | * @param int $id 166 | * @return \Illuminate\Http\Response 167 | */ 168 | public function destroy($id) 169 | { 170 | $post = post::withTrashed()->where('id', $id)->firstOrFail(); 171 | 172 | if ($post->trashed()){ 173 | 174 | $post->deleteImage(); 175 | 176 | $post->forceDelete(); 177 | 178 | } else { 179 | 180 | $post->delete(); 181 | } 182 | 183 | session()->flash('success', 'Post deleted successfully.'); 184 | 185 | //redirect user 186 | return redirect(route('posts.index')); 187 | } 188 | 189 | /** 190 | * Display all trashed posts 191 | * 192 | * @param int $id 193 | * @return \Illuminate\Http\Response 194 | */ 195 | public function trashed() 196 | { 197 | $trashed = Post::onlyTrashed()->get(); 198 | 199 | return view('posts.index')->withPosts($trashed); 200 | } 201 | 202 | public function restore($id) 203 | { 204 | $post = post::withTrashed()->where('id', $id)->firstOrFail(); 205 | 206 | $post->restore(); 207 | 208 | session()->flash('success', 'Post restored successfuly'); 209 | 210 | return redirect()->back(); 211 | } 212 | } 213 | -------------------------------------------------------------------------------- /cms/app/Http/Controllers/TagsController.php: -------------------------------------------------------------------------------- 1 | with('tags', Tag::all()); 23 | } 24 | 25 | /** 26 | * Show the form for creating a new resource. 27 | * 28 | * @return \Illuminate\Http\Response 29 | */ 30 | public function create() 31 | { 32 | return view ('tags.create'); 33 | } 34 | 35 | /** 36 | * Store a newly created resource in storage. 37 | * 38 | * @param \Illuminate\Http\Request $request 39 | * @return \Illuminate\Http\Response 40 | */ 41 | public function store(CreateTagRequest $request) 42 | { 43 | // $this->validate($request, [ 44 | // 'name'=> 'required|unique:Tags' 45 | // ]); 46 | 47 | Tag::create([ 48 | 49 | 'name'=> $request->name 50 | ]); 51 | 52 | session()->flash('success', 'Tag created successfully.'); 53 | 54 | return redirect(route('tags.index')); 55 | } 56 | 57 | /** 58 | * Display the specified resource. 59 | * 60 | * @param int $id 61 | * @return \Illuminate\Http\Response 62 | */ 63 | public function show($id) 64 | { 65 | // 66 | } 67 | 68 | /** 69 | * Show the form for editing the specified resource. 70 | * 71 | * @param int $id 72 | * @return \Illuminate\Http\Response 73 | */ 74 | public function edit(Tag $tag) 75 | { 76 | return view('tags.create')->with('tag', $tag); 77 | } 78 | 79 | /** 80 | * Update the specified resource in storage. 81 | * 82 | * @param \Illuminate\Http\Request $request 83 | * @param int $id 84 | * @return \Illuminate\Http\Response 85 | */ 86 | public function update(UpdateTagsRequest $request, Tag $tag) 87 | { 88 | // $Tag->name = $request->name; 89 | $tag->update([ 90 | 91 | 'name'=> $request->name 92 | ]); 93 | 94 | 95 | session()->flash('success', 'Tag updated successfully'); 96 | 97 | return redirect(route('tags.index')); 98 | } 99 | 100 | /** 101 | * Remove the specified resource from storage. 102 | * 103 | * @param int $id 104 | * @return \Illuminate\Http\Response 105 | */ 106 | public function destroy(Tag $tag) 107 | { 108 | if ($tag->posts->count()>0) { 109 | 110 | session()->flash('error', 'Tag cannot be deleted because it is associated with some posts'); 111 | 112 | return redirect()->back(); 113 | } 114 | 115 | $tag->delete(); 116 | 117 | session()->flash('success', 'Tag deleted successfully'); 118 | 119 | return redirect(route('tags.index')); 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /cms/app/Http/Controllers/UsersController.php: -------------------------------------------------------------------------------- 1 | with('users', User::all()); 16 | } 17 | 18 | public function edit() 19 | { 20 | return view('users.edit')->with('user', auth()->user()); 21 | } 22 | 23 | public function update(UpdateProfileRequest $request) 24 | { 25 | $user = auth()->user(); 26 | 27 | $user->update([ 28 | 'name' => $request->name, 29 | 'about' => $request->about 30 | ]); 31 | 32 | session()->flash('success', 'User updated successfully'); 33 | 34 | return redirect()->back(); 35 | } 36 | 37 | public function makeAdmin(User $user) 38 | { 39 | $user->role = 'admin'; 40 | 41 | $user->save(); 42 | 43 | session()->flash('success', 'User made admin successfully'); 44 | 45 | return redirect(route('users.index')); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /cms/app/Http/Controllers/WelcomController.php: -------------------------------------------------------------------------------- 1 | query('search'); 20 | // if ($search) { 21 | // $posts = Post::where('title', 'LIKE', "%{$search}%")->simplePaginate(2); 22 | // }else{ 23 | // $posts = Post::simplePaginate(2); 24 | // } 25 | 26 | 27 | 28 | 29 | return view('welcome') 30 | ->with('categories', Category::all()) 31 | ->with('tags', Tag::all()) 32 | ->with('posts', Post::searched()->simplePaginate(2)); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /cms/app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | [ 35 | \App\Http\Middleware\EncryptCookies::class, 36 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 37 | \Illuminate\Session\Middleware\StartSession::class, 38 | // \Illuminate\Session\Middleware\AuthenticateSession::class, 39 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 40 | \App\Http\Middleware\VerifyCsrfToken::class, 41 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 42 | ], 43 | 44 | 'api' => [ 45 | 'throttle:60,1', 46 | 'bindings', 47 | ], 48 | ]; 49 | 50 | /** 51 | * The application's route middleware. 52 | * 53 | * These middleware may be assigned to groups or used individually. 54 | * 55 | * @var array 56 | */ 57 | protected $routeMiddleware = [ 58 | 'auth' => \App\Http\Middleware\Authenticate::class, 59 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 60 | 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, 61 | 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 62 | 'can' => \Illuminate\Auth\Middleware\Authorize::class, 63 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 64 | 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, 65 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 66 | 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, 67 | 'verifyCategoriesCount' => VerifyCategoriesCount::class, 68 | 'admin' => verifyIsAdmin::class 69 | ]; 70 | 71 | /** 72 | * The priority-sorted list of middleware. 73 | * 74 | * This forces non-global middleware to always be in the given order. 75 | * 76 | * @var array 77 | */ 78 | protected $middlewarePriority = [ 79 | \Illuminate\Session\Middleware\StartSession::class, 80 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 81 | \App\Http\Middleware\Authenticate::class, 82 | \Illuminate\Session\Middleware\AuthenticateSession::class, 83 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 84 | \Illuminate\Auth\Middleware\Authorize::class, 85 | ]; 86 | } 87 | -------------------------------------------------------------------------------- /cms/app/Http/Middleware/Authenticate.php: -------------------------------------------------------------------------------- 1 | expectsJson()) { 18 | return route('login'); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /cms/app/Http/Middleware/CheckForMaintenanceMode.php: -------------------------------------------------------------------------------- 1 | check()) { 21 | return redirect('/home'); 22 | } 23 | 24 | return $next($request); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /cms/app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | count() == 0) { 21 | session()->flash('error', 'You need to add categories to be able to create a post.'); 22 | return redirect(route('categories.create')); 23 | // return redirect('/home'); 24 | } 25 | 26 | return $next($request); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /cms/app/Http/Middleware/VerifyCsrfToken.php: -------------------------------------------------------------------------------- 1 | user()->isAdmin()) { 19 | 20 | return redirect( route('home')); 21 | } 22 | 23 | return $next($request); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /cms/app/Http/Requests/Categories/CreateCategoryRequest.php: -------------------------------------------------------------------------------- 1 | 'required|unique:categories' 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /cms/app/Http/Requests/Categories/UpdateCategoriesRequest.php: -------------------------------------------------------------------------------- 1 | 'required|unique:categories' 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /cms/app/Http/Requests/Tags/CreateTagRequest.php: -------------------------------------------------------------------------------- 1 | 'required|unique:tags' 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /cms/app/Http/Requests/Tags/UpdateTagsRequest.php: -------------------------------------------------------------------------------- 1 | 'required|unique:tags' 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /cms/app/Http/Requests/Users/UpdateProfileRequest.php: -------------------------------------------------------------------------------- 1 | 'required', 28 | 'about' => 'required' 29 | ]; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /cms/app/Http/Requests/posts/CreatePostsRequest.php: -------------------------------------------------------------------------------- 1 | 'required|unique:posts', 28 | 'decription' => 'nullable', 29 | 'image' => 'required|image', 30 | 'content' => 'required', 31 | 'category' => 'required' 32 | ]; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /cms/app/Http/Requests/posts/UpdatePostRequest.php: -------------------------------------------------------------------------------- 1 | 'required', 28 | 29 | 'description' => 'required', 30 | 31 | 'content' => 'required', 32 | 33 | 'category' => 'required' 34 | ]; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /cms/app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 17 | ]; 18 | 19 | /** 20 | * Register any authentication / authorization services. 21 | * 22 | * @return void 23 | */ 24 | public function boot() 25 | { 26 | $this->registerPolicies(); 27 | 28 | // 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /cms/app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 19 | SendEmailVerificationNotification::class, 20 | ], 21 | ]; 22 | 23 | /** 24 | * Register any events for your application. 25 | * 26 | * @return void 27 | */ 28 | public function boot() 29 | { 30 | parent::boot(); 31 | 32 | // 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /cms/app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | mapApiRoutes(); 39 | 40 | $this->mapWebRoutes(); 41 | 42 | // 43 | } 44 | 45 | /** 46 | * Define the "web" routes for the application. 47 | * 48 | * These routes all receive session state, CSRF protection, etc. 49 | * 50 | * @return void 51 | */ 52 | protected function mapWebRoutes() 53 | { 54 | Route::middleware('web') 55 | ->namespace($this->namespace) 56 | ->group(base_path('routes/web.php')); 57 | } 58 | 59 | /** 60 | * Define the "api" routes for the application. 61 | * 62 | * These routes are typically stateless. 63 | * 64 | * @return void 65 | */ 66 | protected function mapApiRoutes() 67 | { 68 | Route::prefix('api') 69 | ->middleware('api') 70 | ->namespace($this->namespace) 71 | ->group(base_path('routes/api.php')); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /cms/app/Tag.php: -------------------------------------------------------------------------------- 1 | belongsToMany(Post::class); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /cms/app/User.php: -------------------------------------------------------------------------------- 1 | 'datetime', 38 | ]; 39 | 40 | public function isAdmin() 41 | { 42 | return $this->role == 'admin'; 43 | } 44 | 45 | public function posts() 46 | { 47 | return $this->hasMany(Post::class); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /cms/app/category.php: -------------------------------------------------------------------------------- 1 | hasMany(Post::class); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /cms/app/post.php: -------------------------------------------------------------------------------- 1 | image); 31 | } 32 | 33 | public function category () 34 | { 35 | return $this->belongsTo(Category::class); 36 | } 37 | 38 | public function tags() 39 | { 40 | return $this->belongsToMany(Tag::class); 41 | } 42 | 43 | /** 44 | * Check if a post has a tag 45 | * 46 | * @return bool 47 | */ 48 | public function hasTag($tagId) 49 | { 50 | return in_array($tagId, $this->tags->pluck('id')->toArray()); 51 | } 52 | 53 | public function user() 54 | { 55 | return $this->belongsTo(User::class); 56 | } 57 | 58 | public function scopePublished($query) 59 | { 60 | return $query->where('published_at', '<=', now()); 61 | } 62 | 63 | public function scopeSearched($query) 64 | { 65 | $search = request()->query('search'); 66 | 67 | if (!$search) { 68 | return $query->published(); 69 | } 70 | 71 | return $query->published()->where('title', 'LIKE', "%{$search}%"); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /cms/artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make(Illuminate\Contracts\Console\Kernel::class); 34 | 35 | $status = $kernel->handle( 36 | $input = new Symfony\Component\Console\Input\ArgvInput, 37 | new Symfony\Component\Console\Output\ConsoleOutput 38 | ); 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Shutdown The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once Artisan has finished running, we will fire off the shutdown events 46 | | so that any final work may be done by the application before we shut 47 | | down the process. This is the last thing to happen to the request. 48 | | 49 | */ 50 | 51 | $kernel->terminate($input, $status); 52 | 53 | exit($status); 54 | -------------------------------------------------------------------------------- /cms/bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 30 | Illuminate\Contracts\Http\Kernel::class, 31 | App\Http\Kernel::class 32 | ); 33 | 34 | $app->singleton( 35 | Illuminate\Contracts\Console\Kernel::class, 36 | App\Console\Kernel::class 37 | ); 38 | 39 | $app->singleton( 40 | Illuminate\Contracts\Debug\ExceptionHandler::class, 41 | App\Exceptions\Handler::class 42 | ); 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Return The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This script returns the application instance. The instance is given to 50 | | the calling script so we can separate the building of the instances 51 | | from the actual running of the application and sending responses. 52 | | 53 | */ 54 | 55 | return $app; 56 | -------------------------------------------------------------------------------- /cms/bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /cms/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel/laravel", 3 | "type": "project", 4 | "description": "The Laravel Framework.", 5 | "keywords": [ 6 | "framework", 7 | "laravel" 8 | ], 9 | "license": "MIT", 10 | "require": { 11 | "php": "^7.1.3", 12 | "fideloper/proxy": "^4.0", 13 | "laravel/framework": "5.8.*", 14 | "laravel/tinker": "^1.0", 15 | "thomaswelton/laravel-gravatar": "~1.0" 16 | }, 17 | "require-dev": { 18 | "beyondcode/laravel-dump-server": "^1.0", 19 | "filp/whoops": "^2.0", 20 | "fzaninotto/faker": "^1.4", 21 | "mockery/mockery": "^1.0", 22 | "nunomaduro/collision": "^2.0", 23 | "phpunit/phpunit": "^7.5" 24 | }, 25 | "config": { 26 | "optimize-autoloader": true, 27 | "preferred-install": "dist", 28 | "sort-packages": true 29 | }, 30 | "extra": { 31 | "laravel": { 32 | "dont-discover": [] 33 | } 34 | }, 35 | "autoload": { 36 | "psr-4": { 37 | "App\\": "app/" 38 | }, 39 | "classmap": [ 40 | "database/seeds", 41 | "database/factories" 42 | ] 43 | }, 44 | "autoload-dev": { 45 | "psr-4": { 46 | "Tests\\": "tests/" 47 | } 48 | }, 49 | "minimum-stability": "dev", 50 | "prefer-stable": true, 51 | "scripts": { 52 | "post-autoload-dump": [ 53 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 54 | "@php artisan package:discover --ansi" 55 | ], 56 | "post-root-package-install": [ 57 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 58 | ], 59 | "post-create-project-cmd": [ 60 | "@php artisan key:generate --ansi" 61 | ] 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /cms/config/auth.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'guard' => 'web', 18 | 'passwords' => 'users', 19 | ], 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Authentication Guards 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Next, you may define every authentication guard for your application. 27 | | Of course, a great default configuration has been defined for you 28 | | here which uses session storage and the Eloquent user provider. 29 | | 30 | | All authentication drivers have a user provider. This defines how the 31 | | users are actually retrieved out of your database or other storage 32 | | mechanisms used by this application to persist your user's data. 33 | | 34 | | Supported: "session", "token" 35 | | 36 | */ 37 | 38 | 'guards' => [ 39 | 'web' => [ 40 | 'driver' => 'session', 41 | 'provider' => 'users', 42 | ], 43 | 44 | 'api' => [ 45 | 'driver' => 'token', 46 | 'provider' => 'users', 47 | 'hash' => false, 48 | ], 49 | ], 50 | 51 | /* 52 | |-------------------------------------------------------------------------- 53 | | User Providers 54 | |-------------------------------------------------------------------------- 55 | | 56 | | All authentication drivers have a user provider. This defines how the 57 | | users are actually retrieved out of your database or other storage 58 | | mechanisms used by this application to persist your user's data. 59 | | 60 | | If you have multiple user tables or models you may configure multiple 61 | | sources which represent each model / table. These sources may then 62 | | be assigned to any extra authentication guards you have defined. 63 | | 64 | | Supported: "database", "eloquent" 65 | | 66 | */ 67 | 68 | 'providers' => [ 69 | 'users' => [ 70 | 'driver' => 'eloquent', 71 | 'model' => App\User::class, 72 | ], 73 | 74 | // 'users' => [ 75 | // 'driver' => 'database', 76 | // 'table' => 'users', 77 | // ], 78 | ], 79 | 80 | /* 81 | |-------------------------------------------------------------------------- 82 | | Resetting Passwords 83 | |-------------------------------------------------------------------------- 84 | | 85 | | You may specify multiple password reset configurations if you have more 86 | | than one user table or model in the application and you want to have 87 | | separate password reset settings based on the specific user types. 88 | | 89 | | The expire time is the number of minutes that the reset token should be 90 | | considered valid. This security feature keeps tokens short-lived so 91 | | they have less time to be guessed. You may change this as needed. 92 | | 93 | */ 94 | 95 | 'passwords' => [ 96 | 'users' => [ 97 | 'provider' => 'users', 98 | 'table' => 'password_resets', 99 | 'expire' => 60, 100 | ], 101 | ], 102 | 103 | ]; 104 | -------------------------------------------------------------------------------- /cms/config/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'null'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Broadcast Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the broadcast connections that will be used 26 | | to broadcast events to other systems or over websockets. Samples of 27 | | each available type of connection are provided inside this array. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'pusher' => [ 34 | 'driver' => 'pusher', 35 | 'key' => env('PUSHER_APP_KEY'), 36 | 'secret' => env('PUSHER_APP_SECRET'), 37 | 'app_id' => env('PUSHER_APP_ID'), 38 | 'options' => [ 39 | 'cluster' => env('PUSHER_APP_CLUSTER'), 40 | 'encrypted' => true, 41 | ], 42 | ], 43 | 44 | 'redis' => [ 45 | 'driver' => 'redis', 46 | 'connection' => 'default', 47 | ], 48 | 49 | 'log' => [ 50 | 'driver' => 'log', 51 | ], 52 | 53 | 'null' => [ 54 | 'driver' => 'null', 55 | ], 56 | 57 | ], 58 | 59 | ]; 60 | -------------------------------------------------------------------------------- /cms/config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 22 | 23 | /* 24 | |-------------------------------------------------------------------------- 25 | | Cache Stores 26 | |-------------------------------------------------------------------------- 27 | | 28 | | Here you may define all of the cache "stores" for your application as 29 | | well as their drivers. You may even define multiple stores for the 30 | | same cache driver to group types of items stored in your caches. 31 | | 32 | */ 33 | 34 | 'stores' => [ 35 | 36 | 'apc' => [ 37 | 'driver' => 'apc', 38 | ], 39 | 40 | 'array' => [ 41 | 'driver' => 'array', 42 | ], 43 | 44 | 'database' => [ 45 | 'driver' => 'database', 46 | 'table' => 'cache', 47 | 'connection' => null, 48 | ], 49 | 50 | 'file' => [ 51 | 'driver' => 'file', 52 | 'path' => storage_path('framework/cache/data'), 53 | ], 54 | 55 | 'memcached' => [ 56 | 'driver' => 'memcached', 57 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 58 | 'sasl' => [ 59 | env('MEMCACHED_USERNAME'), 60 | env('MEMCACHED_PASSWORD'), 61 | ], 62 | 'options' => [ 63 | // Memcached::OPT_CONNECT_TIMEOUT => 2000, 64 | ], 65 | 'servers' => [ 66 | [ 67 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 68 | 'port' => env('MEMCACHED_PORT', 11211), 69 | 'weight' => 100, 70 | ], 71 | ], 72 | ], 73 | 74 | 'redis' => [ 75 | 'driver' => 'redis', 76 | 'connection' => 'cache', 77 | ], 78 | 79 | 'dynamodb' => [ 80 | 'driver' => 'dynamodb', 81 | 'key' => env('AWS_ACCESS_KEY_ID'), 82 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 83 | 'region' => env('AWS_REGION', 'us-east-1'), 84 | 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), 85 | ], 86 | 87 | ], 88 | 89 | /* 90 | |-------------------------------------------------------------------------- 91 | | Cache Key Prefix 92 | |-------------------------------------------------------------------------- 93 | | 94 | | When utilizing a RAM based store such as APC or Memcached, there might 95 | | be other applications utilizing the same cache. So, we'll specify a 96 | | value to get prefixed to all our keys so we can avoid collisions. 97 | | 98 | */ 99 | 100 | 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'), 101 | 102 | ]; 103 | -------------------------------------------------------------------------------- /cms/config/database.php: -------------------------------------------------------------------------------- 1 | env('DB_CONNECTION', 'mysql'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Database Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here are each of the database connections setup for your application. 24 | | Of course, examples of configuring each database platform that is 25 | | supported by Laravel is shown below to make development simple. 26 | | 27 | | 28 | | All database work in Laravel is done through the PHP PDO facilities 29 | | so make sure you have the driver for your particular database of 30 | | choice installed on your machine before you begin development. 31 | | 32 | */ 33 | 34 | 'connections' => [ 35 | 36 | 'sqlite' => [ 37 | 'driver' => 'sqlite', 38 | 'database' => env('DB_DATABASE', database_path('database.sqlite')), 39 | 'prefix' => '', 40 | 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), 41 | ], 42 | 43 | 'mysql' => [ 44 | 'driver' => 'mysql', 45 | 'host' => env('DB_HOST', '127.0.0.1'), 46 | 'port' => env('DB_PORT', '3306'), 47 | 'database' => env('DB_DATABASE', 'forge'), 48 | 'username' => env('DB_USERNAME', 'forge'), 49 | 'password' => env('DB_PASSWORD', ''), 50 | 'unix_socket' => env('DB_SOCKET', ''), 51 | 'charset' => 'utf8mb4', 52 | 'collation' => 'utf8mb4_unicode_ci', 53 | 'prefix' => '', 54 | 'prefix_indexes' => true, 55 | 'strict' => true, 56 | 'engine' => null, 57 | 'options' => array_filter([ 58 | PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), 59 | ]), 60 | ], 61 | 62 | 'pgsql' => [ 63 | 'driver' => 'pgsql', 64 | 'host' => env('DB_HOST', '127.0.0.1'), 65 | 'port' => env('DB_PORT', '5432'), 66 | 'database' => env('DB_DATABASE', 'forge'), 67 | 'username' => env('DB_USERNAME', 'forge'), 68 | 'password' => env('DB_PASSWORD', ''), 69 | 'charset' => 'utf8', 70 | 'prefix' => '', 71 | 'prefix_indexes' => true, 72 | 'schema' => 'public', 73 | 'sslmode' => 'prefer', 74 | ], 75 | 76 | 'sqlsrv' => [ 77 | 'driver' => 'sqlsrv', 78 | 'host' => env('DB_HOST', 'localhost'), 79 | 'port' => env('DB_PORT', '1433'), 80 | 'database' => env('DB_DATABASE', 'forge'), 81 | 'username' => env('DB_USERNAME', 'forge'), 82 | 'password' => env('DB_PASSWORD', ''), 83 | 'charset' => 'utf8', 84 | 'prefix' => '', 85 | 'prefix_indexes' => true, 86 | ], 87 | 88 | ], 89 | 90 | /* 91 | |-------------------------------------------------------------------------- 92 | | Migration Repository Table 93 | |-------------------------------------------------------------------------- 94 | | 95 | | This table keeps track of all the migrations that have already run for 96 | | your application. Using this information, we can determine which of 97 | | the migrations on disk haven't actually been run in the database. 98 | | 99 | */ 100 | 101 | 'migrations' => 'migrations', 102 | 103 | /* 104 | |-------------------------------------------------------------------------- 105 | | Redis Databases 106 | |-------------------------------------------------------------------------- 107 | | 108 | | Redis is an open source, fast, and advanced key-value store that also 109 | | provides a richer body of commands than a typical key-value system 110 | | such as APC or Memcached. Laravel makes it easy to dig right in. 111 | | 112 | */ 113 | 114 | 'redis' => [ 115 | 116 | 'client' => env('REDIS_CLIENT', 'predis'), 117 | 118 | 'options' => [ 119 | 'cluster' => env('REDIS_CLUSTER', 'predis'), 120 | ], 121 | 122 | 'default' => [ 123 | 'host' => env('REDIS_HOST', '127.0.0.1'), 124 | 'password' => env('REDIS_PASSWORD', null), 125 | 'port' => env('REDIS_PORT', 6379), 126 | 'database' => env('REDIS_DB', 0), 127 | ], 128 | 129 | 'cache' => [ 130 | 'host' => env('REDIS_HOST', '127.0.0.1'), 131 | 'password' => env('REDIS_PASSWORD', null), 132 | 'port' => env('REDIS_PORT', 6379), 133 | 'database' => env('REDIS_CACHE_DB', 1), 134 | ], 135 | 136 | ], 137 | 138 | ]; 139 | -------------------------------------------------------------------------------- /cms/config/filesystems.php: -------------------------------------------------------------------------------- 1 | env('FILESYSTEM_DRIVER', 'local'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Default Cloud Filesystem Disk 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Many applications store files both locally and in the cloud. For this 24 | | reason, you may specify a default "cloud" driver here. This driver 25 | | will be bound as the Cloud disk implementation in the container. 26 | | 27 | */ 28 | 29 | 'cloud' => env('FILESYSTEM_CLOUD', 's3'), 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Filesystem Disks 34 | |-------------------------------------------------------------------------- 35 | | 36 | | Here you may configure as many filesystem "disks" as you wish, and you 37 | | may even configure multiple disks of the same driver. Defaults have 38 | | been setup for each driver as an example of the required options. 39 | | 40 | | Supported Drivers: "local", "ftp", "sftp", "s3", "rackspace" 41 | | 42 | */ 43 | 44 | 'disks' => [ 45 | 46 | 'local' => [ 47 | 'driver' => 'local', 48 | 'root' => storage_path('app'), 49 | ], 50 | 51 | 'public' => [ 52 | 'driver' => 'local', 53 | 'root' => storage_path('app/public'), 54 | 'url' => env('APP_URL').'/storage', 55 | 'visibility' => 'public', 56 | ], 57 | 58 | 's3' => [ 59 | 'driver' => 's3', 60 | 'key' => env('AWS_ACCESS_KEY_ID'), 61 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 62 | 'region' => env('AWS_DEFAULT_REGION'), 63 | 'bucket' => env('AWS_BUCKET'), 64 | 'url' => env('AWS_URL'), 65 | ], 66 | 67 | ], 68 | 69 | ]; 70 | -------------------------------------------------------------------------------- /cms/config/hashing.php: -------------------------------------------------------------------------------- 1 | 'bcrypt', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Bcrypt Options 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may specify the configuration options that should be used when 26 | | passwords are hashed using the Bcrypt algorithm. This will allow you 27 | | to control the amount of time it takes to hash the given password. 28 | | 29 | */ 30 | 31 | 'bcrypt' => [ 32 | 'rounds' => env('BCRYPT_ROUNDS', 10), 33 | ], 34 | 35 | /* 36 | |-------------------------------------------------------------------------- 37 | | Argon Options 38 | |-------------------------------------------------------------------------- 39 | | 40 | | Here you may specify the configuration options that should be used when 41 | | passwords are hashed using the Argon algorithm. These will allow you 42 | | to control the amount of time it takes to hash the given password. 43 | | 44 | */ 45 | 46 | 'argon' => [ 47 | 'memory' => 1024, 48 | 'threads' => 2, 49 | 'time' => 2, 50 | ], 51 | 52 | ]; 53 | -------------------------------------------------------------------------------- /cms/config/logging.php: -------------------------------------------------------------------------------- 1 | env('LOG_CHANNEL', 'stack'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Log Channels 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Here you may configure the log channels for your application. Out of 27 | | the box, Laravel uses the Monolog PHP logging library. This gives 28 | | you a variety of powerful log handlers / formatters to utilize. 29 | | 30 | | Available Drivers: "single", "daily", "slack", "syslog", 31 | | "errorlog", "monolog", 32 | | "custom", "stack" 33 | | 34 | */ 35 | 36 | 'channels' => [ 37 | 'stack' => [ 38 | 'driver' => 'stack', 39 | 'channels' => ['daily'], 40 | 'ignore_exceptions' => false, 41 | ], 42 | 43 | 'single' => [ 44 | 'driver' => 'single', 45 | 'path' => storage_path('logs/laravel.log'), 46 | 'level' => 'debug', 47 | ], 48 | 49 | 'daily' => [ 50 | 'driver' => 'daily', 51 | 'path' => storage_path('logs/laravel.log'), 52 | 'level' => 'debug', 53 | 'days' => 14, 54 | ], 55 | 56 | 'slack' => [ 57 | 'driver' => 'slack', 58 | 'url' => env('LOG_SLACK_WEBHOOK_URL'), 59 | 'username' => 'Laravel Log', 60 | 'emoji' => ':boom:', 61 | 'level' => 'critical', 62 | ], 63 | 64 | 'papertrail' => [ 65 | 'driver' => 'monolog', 66 | 'level' => 'debug', 67 | 'handler' => SyslogUdpHandler::class, 68 | 'handler_with' => [ 69 | 'host' => env('PAPERTRAIL_URL'), 70 | 'port' => env('PAPERTRAIL_PORT'), 71 | ], 72 | ], 73 | 74 | 'stderr' => [ 75 | 'driver' => 'monolog', 76 | 'handler' => StreamHandler::class, 77 | 'formatter' => env('LOG_STDERR_FORMATTER'), 78 | 'with' => [ 79 | 'stream' => 'php://stderr', 80 | ], 81 | ], 82 | 83 | 'syslog' => [ 84 | 'driver' => 'syslog', 85 | 'level' => 'debug', 86 | ], 87 | 88 | 'errorlog' => [ 89 | 'driver' => 'errorlog', 90 | 'level' => 'debug', 91 | ], 92 | ], 93 | 94 | ]; 95 | -------------------------------------------------------------------------------- /cms/config/mail.php: -------------------------------------------------------------------------------- 1 | env('MAIL_DRIVER', 'smtp'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | SMTP Host Address 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Here you may provide the host address of the SMTP server used by your 27 | | applications. A default option is provided that is compatible with 28 | | the Mailgun mail service which will provide reliable deliveries. 29 | | 30 | */ 31 | 32 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 33 | 34 | /* 35 | |-------------------------------------------------------------------------- 36 | | SMTP Host Port 37 | |-------------------------------------------------------------------------- 38 | | 39 | | This is the SMTP port used by your application to deliver e-mails to 40 | | users of the application. Like the host we have set this value to 41 | | stay compatible with the Mailgun e-mail application by default. 42 | | 43 | */ 44 | 45 | 'port' => env('MAIL_PORT', 587), 46 | 47 | /* 48 | |-------------------------------------------------------------------------- 49 | | Global "From" Address 50 | |-------------------------------------------------------------------------- 51 | | 52 | | You may wish for all e-mails sent by your application to be sent from 53 | | the same address. Here, you may specify a name and address that is 54 | | used globally for all e-mails that are sent by your application. 55 | | 56 | */ 57 | 58 | 'from' => [ 59 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), 60 | 'name' => env('MAIL_FROM_NAME', 'Example'), 61 | ], 62 | 63 | /* 64 | |-------------------------------------------------------------------------- 65 | | E-Mail Encryption Protocol 66 | |-------------------------------------------------------------------------- 67 | | 68 | | Here you may specify the encryption protocol that should be used when 69 | | the application send e-mail messages. A sensible default using the 70 | | transport layer security protocol should provide great security. 71 | | 72 | */ 73 | 74 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 75 | 76 | /* 77 | |-------------------------------------------------------------------------- 78 | | SMTP Server Username 79 | |-------------------------------------------------------------------------- 80 | | 81 | | If your SMTP server requires a username for authentication, you should 82 | | set it here. This will get used to authenticate with your server on 83 | | connection. You may also set the "password" value below this one. 84 | | 85 | */ 86 | 87 | 'username' => env('MAIL_USERNAME'), 88 | 89 | 'password' => env('MAIL_PASSWORD'), 90 | 91 | /* 92 | |-------------------------------------------------------------------------- 93 | | Sendmail System Path 94 | |-------------------------------------------------------------------------- 95 | | 96 | | When using the "sendmail" driver to send e-mails, we will need to know 97 | | the path to where Sendmail lives on this server. A default path has 98 | | been provided here, which will work well on most of your systems. 99 | | 100 | */ 101 | 102 | 'sendmail' => '/usr/sbin/sendmail -bs', 103 | 104 | /* 105 | |-------------------------------------------------------------------------- 106 | | Markdown Mail Settings 107 | |-------------------------------------------------------------------------- 108 | | 109 | | If you are using Markdown based email rendering, you may configure your 110 | | theme and component paths here, allowing you to customize the design 111 | | of the emails. Or, you may simply stick with the Laravel defaults! 112 | | 113 | */ 114 | 115 | 'markdown' => [ 116 | 'theme' => 'default', 117 | 118 | 'paths' => [ 119 | resource_path('views/vendor/mail'), 120 | ], 121 | ], 122 | 123 | /* 124 | |-------------------------------------------------------------------------- 125 | | Log Channel 126 | |-------------------------------------------------------------------------- 127 | | 128 | | If you are using the "log" driver, you may specify the logging channel 129 | | if you prefer to keep mail messages separate from other log entries 130 | | for simpler reading. Otherwise, the default channel will be used. 131 | | 132 | */ 133 | 134 | 'log_channel' => env('MAIL_LOG_CHANNEL'), 135 | 136 | ]; 137 | -------------------------------------------------------------------------------- /cms/config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_CONNECTION', 'sync'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Queue Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure the connection information for each server that 24 | | is used by your application. A default configuration has been added 25 | | for each back-end shipped with Laravel. You are free to add more. 26 | | 27 | | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'sync' => [ 34 | 'driver' => 'sync', 35 | ], 36 | 37 | 'database' => [ 38 | 'driver' => 'database', 39 | 'table' => 'jobs', 40 | 'queue' => 'default', 41 | 'retry_after' => 90, 42 | ], 43 | 44 | 'beanstalkd' => [ 45 | 'driver' => 'beanstalkd', 46 | 'host' => 'localhost', 47 | 'queue' => 'default', 48 | 'retry_after' => 90, 49 | 'block_for' => 0, 50 | ], 51 | 52 | 'sqs' => [ 53 | 'driver' => 'sqs', 54 | 'key' => env('AWS_ACCESS_KEY_ID'), 55 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 56 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 57 | 'queue' => env('SQS_QUEUE', 'your-queue-name'), 58 | 'region' => env('AWS_REGION', 'us-east-1'), 59 | ], 60 | 61 | 'redis' => [ 62 | 'driver' => 'redis', 63 | 'connection' => 'default', 64 | 'queue' => env('REDIS_QUEUE', 'default'), 65 | 'retry_after' => 90, 66 | 'block_for' => null, 67 | ], 68 | 69 | ], 70 | 71 | /* 72 | |-------------------------------------------------------------------------- 73 | | Failed Queue Jobs 74 | |-------------------------------------------------------------------------- 75 | | 76 | | These options configure the behavior of failed queue job logging so you 77 | | can control which database and table are used to store the jobs that 78 | | have failed. You may change them to any database / table you wish. 79 | | 80 | */ 81 | 82 | 'failed' => [ 83 | 'database' => env('DB_CONNECTION', 'mysql'), 84 | 'table' => 'failed_jobs', 85 | ], 86 | 87 | ]; 88 | -------------------------------------------------------------------------------- /cms/config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), 21 | ], 22 | 23 | 'postmark' => [ 24 | 'token' => env('POSTMARK_TOKEN'), 25 | ], 26 | 27 | 'ses' => [ 28 | 'key' => env('AWS_ACCESS_KEY_ID'), 29 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 30 | 'region' => env('AWS_REGION', 'us-east-1'), 31 | ], 32 | 33 | 'sparkpost' => [ 34 | 'secret' => env('SPARKPOST_SECRET'), 35 | ], 36 | 37 | 'stripe' => [ 38 | 'model' => App\User::class, 39 | 'key' => env('STRIPE_KEY'), 40 | 'secret' => env('STRIPE_SECRET'), 41 | 'webhook' => [ 42 | 'secret' => env('STRIPE_WEBHOOK_SECRET'), 43 | 'tolerance' => env('STRIPE_WEBHOOK_TOLERANCE', 300), 44 | ], 45 | ], 46 | 47 | ]; 48 | -------------------------------------------------------------------------------- /cms/config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | resource_path('views'), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => env( 32 | 'VIEW_COMPILED_PATH', 33 | realpath(storage_path('framework/views')) 34 | ), 35 | 36 | ]; 37 | -------------------------------------------------------------------------------- /cms/database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | -------------------------------------------------------------------------------- /cms/database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | define(User::class, function (Faker $faker) { 19 | return [ 20 | 'name' => $faker->name, 21 | 'email' => $faker->unique()->safeEmail, 22 | 'email_verified_at' => now(), 23 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 24 | 'remember_token' => Str::random(10), 25 | ]; 26 | }); 27 | -------------------------------------------------------------------------------- /cms/database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | $table->string('name'); 19 | $table->string('email')->unique(); 20 | $table->enum('role',['writer','admin'])->default('writer'); 21 | $table->text('about')->nullable(); 22 | $table->timestamp('email_verified_at')->nullable(); 23 | $table->string('password'); 24 | $table->rememberToken(); 25 | $table->timestamps(); 26 | }); 27 | } 28 | 29 | /** 30 | * Reverse the migrations. 31 | * 32 | * @return void 33 | */ 34 | public function down() 35 | { 36 | Schema::dropIfExists('users'); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /cms/database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 18 | $table->string('token'); 19 | $table->timestamp('created_at')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('password_resets'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /cms/database/migrations/2020_04_05_162508_create_categories_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('name'); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('categories'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /cms/database/migrations/2020_04_26_120252_create_tags_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | $table->string('name'); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('tags'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /cms/database/migrations/2020_04_26_195800_create_post_tag_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | $table->integer('post_id'); 19 | $table->integer('tag_id'); 20 | $table->timestamps(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::dropIfExists('post_tag'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /cms/database/migrations/2020_04_27_162329_create_posts_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('title'); 19 | $table->text('description'); 20 | $table->text('content'); 21 | $table->string('image'); 22 | $table->integer('user_id'); 23 | $table->integer('category_id'); 24 | $table->timestamp('published_at')->nullable(); 25 | $table->softDeletes(); 26 | $table->timestamps(); 27 | }); 28 | } 29 | 30 | /** 31 | * Reverse the migrations. 32 | * 33 | * @return void 34 | */ 35 | public function down() 36 | { 37 | Schema::dropIfExists('posts'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /cms/database/migrations/2020_04_28_122643_add_soft_delete_to_posts_table.php: -------------------------------------------------------------------------------- 1 | softDeletes(); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | * 24 | * @return void 25 | */ 26 | public function down() 27 | { 28 | Schema::table('posts', function (Blueprint $table) { 29 | $table->dropColumn('deleted_at'); 30 | }); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /cms/database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(UsersTableSeeder::class); 15 | 16 | $this->call(PostTableSeeder::class); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /cms/database/seeds/PostTableSeeder.php: -------------------------------------------------------------------------------- 1 | 'News' 24 | 25 | ]); 26 | 27 | $author1 = App\User::create([ 28 | 'name' => 'Ronny cyobe', 29 | 'email' => 'ronny@gmail.com', 30 | 'password' => Hash::make('password') 31 | ]); 32 | 33 | $author2 = App\User::create([ 34 | 'name' => 'Ronaldinho cyobe', 35 | 'email' => 'ronaldinho@gmail.com', 36 | 'password' => Hash::make('password') 37 | ]); 38 | 39 | $category2 = Category::create([ 40 | 'name' => 'Marketing' 41 | 42 | ]); 43 | 44 | $category3 = Category::create([ 45 | 'name' => 'Partnership' 46 | ]); 47 | 48 | $post1 = Post::create([ 49 | 'title' => 'We relocated our office to a new designed garage', 50 | 'description' => 'Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search fo', 51 | 'content' => 'Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search fo', 52 | 'category_id' => $category1 ->id, 53 | 'image' => 'posts/1.jpg', 54 | 'user_id' => $author1->id 55 | ]); 56 | 57 | $post2 = $author2->posts()->create([ 58 | 'title' => 'Top 5 brilliant content marketing strategies', 59 | 'description' => 'Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search fo', 60 | 'content' => 'Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search fo', 61 | 'category_id' => $category2 ->id, 62 | 'image' => 'posts/2.jpg' 63 | ]); 64 | 65 | $post3 = $author1->posts()->create([ 66 | 'title' => 'Best practices for minimalist design with example', 67 | 'description' => 'Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search fo', 68 | 'content' => 'Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search fo', 69 | 'category_id' => $category3 ->id, 70 | 'image' => 'posts/3.jpg' 71 | ]); 72 | 73 | $post4 = $author2->posts()->create([ 74 | 'title' => 'Congratulate and thank to Maryam for joining our team', 75 | 'description' => 'Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search fo', 76 | 'content' => 'Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search fo', 77 | 'category_id' => $category2 ->id, 78 | 'image' => 'posts/4.jpg' 79 | ]); 80 | 81 | $tag1 = Tag::create([ 82 | 'name' => 'job' 83 | ]); 84 | 85 | $tag2 = Tag::create([ 86 | 'name' => 'customers' 87 | ]); 88 | 89 | $tag3 = Tag::create([ 90 | 'name' => 'record' 91 | ]); 92 | 93 | $post1->tags()->attach([$tag1->id, $tag2->id]); 94 | 95 | $post2->tags()->attach([$tag2->id, $tag3->id]); 96 | 97 | $post3->tags()->attach([$tag1->id, $tag3->id]); 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /cms/database/seeds/UsersTableSeeder.php: -------------------------------------------------------------------------------- 1 | first(); 19 | 20 | if (!$user) { 21 | 22 | User::create([ 23 | 'name' => 'Ronald Chobe', 24 | 25 | 'email' => 'chobe@gmail.com', 26 | 27 | 'role' => 'admin', 28 | 29 | 'password' => Hash::make('password') 30 | ]); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /cms/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "npm run development", 5 | "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 6 | "watch": "npm run development -- --watch", 7 | "watch-poll": "npm run watch -- --watch-poll", 8 | "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", 9 | "prod": "npm run production", 10 | "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" 11 | }, 12 | "devDependencies": { 13 | "axios": "^0.18", 14 | "bootstrap": "^4.0.0", 15 | "cross-env": "^5.1", 16 | "jquery": "^3.2", 17 | "laravel-mix": "^4.0.7", 18 | "lodash": "^4.17.5", 19 | "popper.js": "^1.12", 20 | "resolve-url-loader": "^2.3.1", 21 | "sass": "^1.15.2", 22 | "sass-loader": "^7.1.0", 23 | "vue": "^2.5.17" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /cms/phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | ./tests/Unit 14 | 15 | 16 | 17 | ./tests/Feature 18 | 19 | 20 | 21 | 22 | ./app 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /cms/public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Handle Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /cms/public/css/style.css: -------------------------------------------------------------------------------- 1 | .block-number{text-align:center;font-weight:bold;font-size:0.8125em;letter-spacing:2px;text-transform:uppercase;color:#191919;-webkit-transition:0.3s ease-out;transition:0.3s ease-out}.block-number:hover{opacity:1}.block-number::after{content:'';display:inline-block;width:0;height:0;margin-left:6px;margin-bottom:2px;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #191919}.block-number a:hover,.block-number a:focus{color:#191919}.demo-section .main-content .section,.demo-topbar .main-content .topbar,.demo-navbar .main-content .navbar,.demo-header .main-content .header,.demo-footer .main-content .footer{margin:30px 20px 100px;border:1px solid #f5f6f7;-webkit-box-shadow:0 0 15px rgba(0,0,0,0.05);box-shadow:0 0 15px rgba(0,0,0,0.05)}.demo-topbar .main-content .topbar,.demo-navbar .main-content .navbar{position:static;margin:0}.sample-blocks img{border-radius:0.25rem}.sample-blocks img.aos-animate{opacity:0.5 !important}.sample-blocks img:hover{opacity:1 !important;-webkit-transition:0.7s !important;transition:0.7s !important}.sample-blocks a{position:absolute}.sample-blocks a:nth-child(1){-webkit-animation:wobble 4s infinite;animation:wobble 4s infinite;right:15px;bottom:-20px}.sample-blocks a:nth-child(2){-webkit-animation:wobble 8s infinite;animation:wobble 8s infinite;right:320px;bottom:30px}.sample-blocks a:nth-child(3){-webkit-animation:wobble 5s infinite;animation:wobble 5s infinite;right:0px;bottom:190px}.sample-blocks a:nth-child(4){-webkit-animation:wobble 6s infinite;animation:wobble 6s infinite;right:280px;bottom:180px}.sample-blocks a:nth-child(5){-webkit-animation:wobble 9s infinite;animation:wobble 9s infinite;right:270px;bottom:320px}.sample-blocks a:nth-child(6){-webkit-animation:wobble 7s infinite;animation:wobble 7s infinite;right:20px;bottom:370px}.sample-blocks a:nth-child(7){-webkit-animation:wobble 5s infinite;animation:wobble 5s infinite;right:200px;bottom:470px}.sample-blocks a:nth-child(8){-webkit-animation:wobble 8s infinite;animation:wobble 8s infinite;right:10px;bottom:470px}.sample-blocks a:nth-child(9){-webkit-animation:wobble 9s infinite;animation:wobble 9s infinite;right:0px;bottom:570px}@-webkit-keyframes wobble{0%{-webkit-transform:rotate(-1deg) translate(-5px, -5px);transform:rotate(-1deg) translate(-5px, -5px)}50%{-webkit-transform:rotate(1deg) translate(5px, 5px);transform:rotate(1deg) translate(5px, 5px)}100%{-webkit-transform:rotate(-1deg) translate(-5px, -5px);transform:rotate(-1deg) translate(-5px, -5px)}}@keyframes wobble{0%{-webkit-transform:rotate(-1deg) translate(-5px, -5px);transform:rotate(-1deg) translate(-5px, -5px)}50%{-webkit-transform:rotate(1deg) translate(5px, 5px);transform:rotate(1deg) translate(5px, 5px)}100%{-webkit-transform:rotate(-1deg) translate(-5px, -5px);transform:rotate(-1deg) translate(-5px, -5px)}}@media (max-width: 400px){body>.footer .social a:last-child,body>.footer .nav a:last-child{display:none}} 2 | 3 | /*# sourceMappingURL=style.css.map */ 4 | -------------------------------------------------------------------------------- /cms/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyobero/laravel-cms/1ae85abac5377a3094aa1c41a7b03a6650304f0d/cms/public/favicon.ico -------------------------------------------------------------------------------- /cms/public/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyobero/laravel-cms/1ae85abac5377a3094aa1c41a7b03a6650304f0d/cms/public/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /cms/public/fonts/et-line.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyobero/laravel-cms/1ae85abac5377a3094aa1c41a7b03a6650304f0d/cms/public/fonts/et-line.eot -------------------------------------------------------------------------------- /cms/public/fonts/et-line.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyobero/laravel-cms/1ae85abac5377a3094aa1c41a7b03a6650304f0d/cms/public/fonts/et-line.ttf -------------------------------------------------------------------------------- /cms/public/fonts/et-line.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyobero/laravel-cms/1ae85abac5377a3094aa1c41a7b03a6650304f0d/cms/public/fonts/et-line.woff -------------------------------------------------------------------------------- /cms/public/fonts/fa-brands-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyobero/laravel-cms/1ae85abac5377a3094aa1c41a7b03a6650304f0d/cms/public/fonts/fa-brands-400.eot -------------------------------------------------------------------------------- /cms/public/fonts/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyobero/laravel-cms/1ae85abac5377a3094aa1c41a7b03a6650304f0d/cms/public/fonts/fa-brands-400.ttf -------------------------------------------------------------------------------- /cms/public/fonts/fa-brands-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyobero/laravel-cms/1ae85abac5377a3094aa1c41a7b03a6650304f0d/cms/public/fonts/fa-brands-400.woff -------------------------------------------------------------------------------- /cms/public/fonts/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyobero/laravel-cms/1ae85abac5377a3094aa1c41a7b03a6650304f0d/cms/public/fonts/fa-brands-400.woff2 -------------------------------------------------------------------------------- /cms/public/fonts/fa-regular-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyobero/laravel-cms/1ae85abac5377a3094aa1c41a7b03a6650304f0d/cms/public/fonts/fa-regular-400.eot -------------------------------------------------------------------------------- /cms/public/fonts/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyobero/laravel-cms/1ae85abac5377a3094aa1c41a7b03a6650304f0d/cms/public/fonts/fa-regular-400.ttf -------------------------------------------------------------------------------- /cms/public/fonts/fa-regular-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyobero/laravel-cms/1ae85abac5377a3094aa1c41a7b03a6650304f0d/cms/public/fonts/fa-regular-400.woff -------------------------------------------------------------------------------- /cms/public/fonts/fa-regular-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyobero/laravel-cms/1ae85abac5377a3094aa1c41a7b03a6650304f0d/cms/public/fonts/fa-regular-400.woff2 -------------------------------------------------------------------------------- /cms/public/fonts/fa-solid-900.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyobero/laravel-cms/1ae85abac5377a3094aa1c41a7b03a6650304f0d/cms/public/fonts/fa-solid-900.eot -------------------------------------------------------------------------------- /cms/public/fonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyobero/laravel-cms/1ae85abac5377a3094aa1c41a7b03a6650304f0d/cms/public/fonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /cms/public/fonts/fa-solid-900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyobero/laravel-cms/1ae85abac5377a3094aa1c41a7b03a6650304f0d/cms/public/fonts/fa-solid-900.woff -------------------------------------------------------------------------------- /cms/public/fonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyobero/laravel-cms/1ae85abac5377a3094aa1c41a7b03a6650304f0d/cms/public/fonts/fa-solid-900.woff2 -------------------------------------------------------------------------------- /cms/public/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyobero/laravel-cms/1ae85abac5377a3094aa1c41a7b03a6650304f0d/cms/public/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /cms/public/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyobero/laravel-cms/1ae85abac5377a3094aa1c41a7b03a6650304f0d/cms/public/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /cms/public/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyobero/laravel-cms/1ae85abac5377a3094aa1c41a7b03a6650304f0d/cms/public/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /cms/public/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyobero/laravel-cms/1ae85abac5377a3094aa1c41a7b03a6650304f0d/cms/public/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /cms/public/fonts/themify.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyobero/laravel-cms/1ae85abac5377a3094aa1c41a7b03a6650304f0d/cms/public/fonts/themify.eot -------------------------------------------------------------------------------- /cms/public/fonts/themify.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyobero/laravel-cms/1ae85abac5377a3094aa1c41a7b03a6650304f0d/cms/public/fonts/themify.ttf -------------------------------------------------------------------------------- /cms/public/fonts/themify.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyobero/laravel-cms/1ae85abac5377a3094aa1c41a7b03a6650304f0d/cms/public/fonts/themify.woff -------------------------------------------------------------------------------- /cms/public/img/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyobero/laravel-cms/1ae85abac5377a3094aa1c41a7b03a6650304f0d/cms/public/img/apple-touch-icon.png -------------------------------------------------------------------------------- /cms/public/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyobero/laravel-cms/1ae85abac5377a3094aa1c41a7b03a6650304f0d/cms/public/img/favicon.png -------------------------------------------------------------------------------- /cms/public/img/logo-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyobero/laravel-cms/1ae85abac5377a3094aa1c41a7b03a6650304f0d/cms/public/img/logo-dark.png -------------------------------------------------------------------------------- /cms/public/img/logo-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyobero/laravel-cms/1ae85abac5377a3094aa1c41a7b03a6650304f0d/cms/public/img/logo-light.png -------------------------------------------------------------------------------- /cms/public/index.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | define('LARAVEL_START', microtime(true)); 11 | 12 | /* 13 | |-------------------------------------------------------------------------- 14 | | Register The Auto Loader 15 | |-------------------------------------------------------------------------- 16 | | 17 | | Composer provides a convenient, automatically generated class loader for 18 | | our application. We just need to utilize it! We'll simply require it 19 | | into the script here so that we don't have to worry about manual 20 | | loading any of our classes later on. It feels great to relax. 21 | | 22 | */ 23 | 24 | require __DIR__.'/../vendor/autoload.php'; 25 | 26 | /* 27 | |-------------------------------------------------------------------------- 28 | | Turn On The Lights 29 | |-------------------------------------------------------------------------- 30 | | 31 | | We need to illuminate PHP development, so let us turn on the lights. 32 | | This bootstraps the framework and gets it ready for use, then it 33 | | will load up this application so that we can run it and send 34 | | the responses back to the browser and delight our users. 35 | | 36 | */ 37 | 38 | $app = require_once __DIR__.'/../bootstrap/app.php'; 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Run The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once we have the application, we can handle the incoming request 46 | | through the kernel, and send the associated response back to 47 | | the client's browser allowing them to enjoy the creative 48 | | and wonderful application we have prepared for them. 49 | | 50 | */ 51 | 52 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); 53 | 54 | $response = $kernel->handle( 55 | $request = Illuminate\Http\Request::capture() 56 | ); 57 | 58 | $response->send(); 59 | 60 | $kernel->terminate($request, $response); 61 | -------------------------------------------------------------------------------- /cms/public/js/script.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | $(function() { 4 | 5 | 6 | /* 7 | |-------------------------------------------------------------------------- 8 | | Configure your website 9 | |-------------------------------------------------------------------------- 10 | | 11 | | We provided several configuration variables for your ease of development. 12 | | Read their complete description and modify them based on your need. 13 | | 14 | */ 15 | 16 | page.config({ 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Google API Key 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may specify your Google API key if you need to use Google Maps 24 | | in your application 25 | | 26 | | https://developers.google.com/maps/documentation/javascript/get-api-key 27 | | 28 | */ 29 | 30 | googleApiKey: 'AIzaSyDRBLFOTTh2NFM93HpUA4ZrA99yKnCAsto', 31 | 32 | /* 33 | |-------------------------------------------------------------------------- 34 | | Google Analytics Tracking 35 | |-------------------------------------------------------------------------- 36 | | 37 | | If you want to use Google Analytics, you can specify your Tracking ID in 38 | | this option. Your key would be a value like: UA-12345678-9 39 | | 40 | */ 41 | 42 | googleAnalyticsId: '', 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Google reCAPTCHA 47 | |-------------------------------------------------------------------------- 48 | | 49 | | reCAPTCHA protects you against spam and other types of automated abuse. 50 | | Please signup for an API key pair and insert your `Site key` value to the 51 | | following variable. 52 | | 53 | | http://www.google.com/recaptcha/admin 54 | | 55 | */ 56 | 57 | reCaptchaSiteKey: '6Ldaf0MUAAAAAHdsMv_7dND7BSTvdrE6VcQKpM-n', 58 | 59 | // See available languages: https://developers.google.com/recaptcha/docs/language 60 | reCaptchaLanguage: '', 61 | 62 | /* 63 | |-------------------------------------------------------------------------- 64 | | Disable AOS on mobile 65 | |-------------------------------------------------------------------------- 66 | | 67 | | If true, the Animate On Scroll animations don't run on mobile devices. 68 | | 69 | */ 70 | 71 | disableAOSonMobile: true, 72 | 73 | /* 74 | |-------------------------------------------------------------------------- 75 | | Smooth Scroll 76 | |-------------------------------------------------------------------------- 77 | | 78 | | If true, the browser's scrollbar moves smoothly on scroll and gives your 79 | | visitor a better experience for scrolling. 80 | | 81 | */ 82 | 83 | smoothScroll: true, 84 | 85 | }); 86 | 87 | 88 | 89 | 90 | 91 | /* 92 | |-------------------------------------------------------------------------- 93 | | Custom Javascript code 94 | |-------------------------------------------------------------------------- 95 | | 96 | | Now that you configured your website, you can write additional Javascript 97 | | code below this comment. You might want to add more plugins and initialize 98 | | them in this file. 99 | | 100 | */ 101 | 102 | 103 | 104 | }); 105 | 106 | -------------------------------------------------------------------------------- /cms/public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /cms/public/web.config: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /cms/readme.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 | Build Status 5 | Total Downloads 6 | Latest Stable Version 7 | License 8 |

9 | 10 | ## About Laravel 11 | 12 | Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as: 13 | 14 | - [Simple, fast routing engine](https://laravel.com/docs/routing). 15 | - [Powerful dependency injection container](https://laravel.com/docs/container). 16 | - Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage. 17 | - Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent). 18 | - Database agnostic [schema migrations](https://laravel.com/docs/migrations). 19 | - [Robust background job processing](https://laravel.com/docs/queues). 20 | - [Real-time event broadcasting](https://laravel.com/docs/broadcasting). 21 | 22 | Laravel is accessible, powerful, and provides tools required for large, robust applications. 23 | 24 | ## Learning Laravel 25 | 26 | Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework. 27 | 28 | If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 1100 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost you and your team's skills by digging into our comprehensive video library. 29 | 30 | ## Laravel Sponsors 31 | 32 | We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell). 33 | 34 | - **[Vehikl](https://vehikl.com/)** 35 | - **[Tighten Co.](https://tighten.co)** 36 | - **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)** 37 | - **[64 Robots](https://64robots.com)** 38 | - **[Cubet Techno Labs](https://cubettech.com)** 39 | - **[Cyber-Duck](https://cyber-duck.co.uk)** 40 | - **[British Software Development](https://www.britishsoftware.co)** 41 | - **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)** 42 | - **[DevSquad](https://devsquad.com)** 43 | - [UserInsights](https://userinsights.com) 44 | - [Fragrantica](https://www.fragrantica.com) 45 | - [SOFTonSOFA](https://softonsofa.com/) 46 | - [User10](https://user10.com) 47 | - [Soumettre.fr](https://soumettre.fr/) 48 | - [CodeBrisk](https://codebrisk.com) 49 | - [1Forge](https://1forge.com) 50 | - [TECPRESSO](https://tecpresso.co.jp/) 51 | - [Runtime Converter](http://runtimeconverter.com/) 52 | - [WebL'Agence](https://weblagence.com/) 53 | - [Invoice Ninja](https://www.invoiceninja.com) 54 | - [iMi digital](https://www.imi-digital.de/) 55 | - [Earthlink](https://www.earthlink.ro/) 56 | - [Steadfast Collective](https://steadfastcollective.com/) 57 | - [We Are The Robots Inc.](https://watr.mx/) 58 | - [Understand.io](https://www.understand.io/) 59 | - [Abdel Elrafa](https://abdelelrafa.com) 60 | 61 | ## Contributing 62 | 63 | Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions). 64 | 65 | ## Security Vulnerabilities 66 | 67 | If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed. 68 | 69 | ## License 70 | 71 | The Laravel framework is open-source software licensed under the [MIT license](https://opensource.org/licenses/MIT). 72 | -------------------------------------------------------------------------------- /cms/resources/js/app.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * First we will load all of this project's JavaScript dependencies which 4 | * includes Vue and other libraries. It is a great starting point when 5 | * building robust, powerful web applications using Vue and Laravel. 6 | */ 7 | 8 | require('./bootstrap'); 9 | 10 | window.Vue = require('vue'); 11 | 12 | /** 13 | * The following block of code may be used to automatically register your 14 | * Vue components. It will recursively scan this directory for the Vue 15 | * components and automatically register them with their "basename". 16 | * 17 | * Eg. ./components/ExampleComponent.vue -> 18 | */ 19 | 20 | // const files = require.context('./', true, /\.vue$/i); 21 | // files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key).default)); 22 | 23 | Vue.component('example-component', require('./components/ExampleComponent.vue').default); 24 | 25 | /** 26 | * Next, we will create a fresh Vue application instance and attach it to 27 | * the page. Then, you may begin adding components to this application 28 | * or customize the JavaScript scaffolding to fit your unique needs. 29 | */ 30 | 31 | const app = new Vue({ 32 | el: '#app' 33 | }); 34 | -------------------------------------------------------------------------------- /cms/resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | 2 | window._ = require('lodash'); 3 | 4 | /** 5 | * We'll load jQuery and the Bootstrap jQuery plugin which provides support 6 | * for JavaScript based Bootstrap features such as modals and tabs. This 7 | * code may be modified to fit the specific needs of your application. 8 | */ 9 | 10 | try { 11 | window.Popper = require('popper.js').default; 12 | window.$ = window.jQuery = require('jquery'); 13 | 14 | require('bootstrap'); 15 | } catch (e) {} 16 | 17 | /** 18 | * We'll load the axios HTTP library which allows us to easily issue requests 19 | * to our Laravel back-end. This library automatically handles sending the 20 | * CSRF token as a header based on the value of the "XSRF" token cookie. 21 | */ 22 | 23 | window.axios = require('axios'); 24 | 25 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 26 | 27 | /** 28 | * Next we will register the CSRF Token as a common header with Axios so that 29 | * all outgoing HTTP requests automatically have it attached. This is just 30 | * a simple convenience so we don't have to attach every token manually. 31 | */ 32 | 33 | let token = document.head.querySelector('meta[name="csrf-token"]'); 34 | 35 | if (token) { 36 | window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content; 37 | } else { 38 | console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token'); 39 | } 40 | 41 | /** 42 | * Echo exposes an expressive API for subscribing to channels and listening 43 | * for events that are broadcast by Laravel. Echo and event broadcasting 44 | * allows your team to easily build robust real-time web applications. 45 | */ 46 | 47 | // import Echo from 'laravel-echo' 48 | 49 | // window.Pusher = require('pusher-js'); 50 | 51 | // window.Echo = new Echo({ 52 | // broadcaster: 'pusher', 53 | // key: process.env.MIX_PUSHER_APP_KEY, 54 | // cluster: process.env.MIX_PUSHER_APP_CLUSTER, 55 | // encrypted: true 56 | // }); 57 | -------------------------------------------------------------------------------- /cms/resources/js/components/ExampleComponent.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 24 | -------------------------------------------------------------------------------- /cms/resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /cms/resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /cms/resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Passwords must be at least eight characters and match the confirmation.', 17 | 'reset' => 'Your password has been reset!', 18 | 'sent' => 'We have e-mailed your password reset link!', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that e-mail address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /cms/resources/sass/_variables.scss: -------------------------------------------------------------------------------- 1 | 2 | // Body 3 | $body-bg: #f8fafc; 4 | 5 | // Typography 6 | $font-family-sans-serif: "Nunito", sans-serif; 7 | $font-size-base: 0.9rem; 8 | $line-height-base: 1.6; 9 | 10 | // Colors 11 | $blue: #3490dc; 12 | $indigo: #6574cd; 13 | $purple: #9561e2; 14 | $pink: #f66D9b; 15 | $red: #e3342f; 16 | $orange: #f6993f; 17 | $yellow: #ffed4a; 18 | $green: #38c172; 19 | $teal: #4dc0b5; 20 | $cyan: #6cb2eb; 21 | -------------------------------------------------------------------------------- /cms/resources/sass/app.scss: -------------------------------------------------------------------------------- 1 | 2 | // Fonts 3 | @import url('https://fonts.googleapis.com/css?family=Nunito'); 4 | 5 | // Variables 6 | @import 'variables'; 7 | 8 | // Bootstrap 9 | @import '~bootstrap/scss/bootstrap'; 10 | 11 | .navbar-laravel { 12 | background-color: #fff; 13 | box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04); 14 | } 15 | -------------------------------------------------------------------------------- /cms/resources/views/auth/login.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Login') }}
9 | 10 |
11 |
12 | @csrf 13 | 14 |
15 | 16 | 17 |
18 | 19 | 20 | @error('email') 21 | 22 | {{ $message }} 23 | 24 | @enderror 25 |
26 |
27 | 28 |
29 | 30 | 31 |
32 | 33 | 34 | @error('password') 35 | 36 | {{ $message }} 37 | 38 | @enderror 39 |
40 |
41 | 42 |
43 |
44 |
45 | 46 | 47 | 50 |
51 |
52 |
53 | 54 |
55 |
56 | 59 | 60 | @if (Route::has('password.request')) 61 | 62 | {{ __('Forgot Your Password?') }} 63 | 64 | @endif 65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 | @endsection 74 | -------------------------------------------------------------------------------- /cms/resources/views/auth/passwords/email.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Reset Password') }}
9 | 10 |
11 | @if (session('status')) 12 | 15 | @endif 16 | 17 |
18 | @csrf 19 | 20 |
21 | 22 | 23 |
24 | 25 | 26 | @error('email') 27 | 28 | {{ $message }} 29 | 30 | @enderror 31 |
32 |
33 | 34 |
35 |
36 | 39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | @endsection 48 | -------------------------------------------------------------------------------- /cms/resources/views/auth/passwords/reset.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Reset Password') }}
9 | 10 |
11 |
12 | @csrf 13 | 14 | 15 | 16 |
17 | 18 | 19 |
20 | 21 | 22 | @error('email') 23 | 24 | {{ $message }} 25 | 26 | @enderror 27 |
28 |
29 | 30 |
31 | 32 | 33 |
34 | 35 | 36 | @error('password') 37 | 38 | {{ $message }} 39 | 40 | @enderror 41 |
42 |
43 | 44 |
45 | 46 | 47 |
48 | 49 |
50 |
51 | 52 |
53 |
54 | 57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 | @endsection 66 | -------------------------------------------------------------------------------- /cms/resources/views/auth/register.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Register') }}
9 | 10 |
11 |
12 | @csrf 13 | 14 |
15 | 16 | 17 |
18 | 19 | 20 | @error('name') 21 | 22 | {{ $message }} 23 | 24 | @enderror 25 |
26 |
27 | 28 |
29 | 30 | 31 |
32 | 33 | 34 | @error('email') 35 | 36 | {{ $message }} 37 | 38 | @enderror 39 |
40 |
41 | 42 |
43 | 44 | 45 |
46 | 47 | 48 | @error('password') 49 | 50 | {{ $message }} 51 | 52 | @enderror 53 |
54 |
55 | 56 |
57 | 58 | 59 |
60 | 61 |
62 |
63 | 64 |
65 |
66 | 69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 | @endsection 78 | -------------------------------------------------------------------------------- /cms/resources/views/auth/verify.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Verify Your Email Address') }}
9 | 10 |
11 | @if (session('resent')) 12 | 15 | @endif 16 | 17 | {{ __('Before proceeding, please check your email for a verification link.') }} 18 | {{ __('If you did not receive the email') }}, {{ __('click here to request another') }}. 19 |
20 |
21 |
22 |
23 |
24 | @endsection 25 | -------------------------------------------------------------------------------- /cms/resources/views/blog/category.blade.php: -------------------------------------------------------------------------------- 1 | 2 | @extends('layouts.blog') 3 | 4 | @section('title') 5 | 6 | Category {{ $category->name }} 7 | 8 | @endsection 9 | 10 | 11 | 12 | 13 | @section('header') 14 | 15 | 16 |
17 |
18 | 19 |
20 |
21 | 22 |

{{ $category->name }}

23 |

Read and get updated on how we progress

24 | 25 |
26 |
27 | 28 |
29 |
30 | 31 | @endsection 32 | 33 | 34 | 35 | @section('content') 36 | 37 | 38 |
39 |
40 |
41 |
42 | 43 | 44 |
45 |
46 | 47 | @forelse($posts as $post) 48 | 49 |
50 |
51 | Card image cap 52 | 64 |
65 |
66 | 67 | @empty 68 | 69 |

70 | No results found for query {{ request()->query('search') }} 71 |

72 | @endforelse 73 | 74 |
75 | 76 | 77 | 81 | {{ $posts->appends(['search'=>request()->query('search') ])->links() }} 82 |
83 | 84 | 85 | @include('partials.sidebar') 86 | 87 |
88 |
89 |
90 |
91 | 92 | 93 | @endsection 94 | 95 | 96 | -------------------------------------------------------------------------------- /cms/resources/views/blog/show.blade.php: -------------------------------------------------------------------------------- 1 | 2 | @extends('layouts.blog') 3 | 4 | @section('title') 5 | 6 | {{ $post->title }} 7 | 8 | @endsection 9 | 10 | 11 | @section('header') 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 | 20 |

Product

21 |

22 | 23 | 24 | {{ $post->title }} 25 | 26 |

27 |

By 28 | {{ $post->user->name }} 29 |

30 | 31 |

...

32 | 33 |
34 | 35 |
36 | 37 |
38 | 39 |
40 | 41 |
42 |
43 | @endsection 44 | 45 | 46 | @section('content') 47 | 48 | 49 |
50 | 51 | 52 | 57 |
58 |
59 | 60 | {!! $post->content !!} 61 | 62 |
63 | 64 |
65 |
66 | @foreach($post->tags as $tag) 67 | 68 | {{ $tag->name }} 69 | 70 | @endforeach 71 |
72 | 73 |
74 |
75 | 76 | 77 |
78 | 79 | 80 | 81 | 82 | 87 |
88 |
89 | 90 |
91 |
92 | 93 |
94 | 95 |
96 | 115 | 116 | 117 | 118 |
119 |
120 | 121 |
122 |
123 | 124 | 125 | 126 |
127 | 128 | 129 | @endsection -------------------------------------------------------------------------------- /cms/resources/views/blog/tag.blade.php: -------------------------------------------------------------------------------- 1 | 2 | @extends('layouts.blog') 3 | 4 | @section('title') 5 | 6 | Tag {{ $tag->name }} 7 | 8 | @endsection 9 | 10 | 11 | 12 | 13 | @section('header') 14 | 15 | 16 |
17 |
18 | 19 |
20 |
21 | 22 |

{{ $tag->name }}

23 |

Read and get updated on how we progress

24 | 25 |
26 |
27 | 28 |
29 |
30 | 31 | @endsection 32 | 33 | 34 | 35 | @section('content') 36 | 37 | 38 |
39 |
40 |
41 |
42 | 43 | 44 |
45 |
46 | 47 | @forelse($posts as $post) 48 | 49 |
50 |
51 | Card image cap 52 | 64 |
65 |
66 | 67 | @empty 68 | 69 |

70 | No results found for query {{ request()->query('search') }} 71 |

72 | @endforelse 73 | 74 |
75 | 76 | 77 | 81 | {{ $posts->appends(['search'=>request()->query('search') ])->links() }} 82 |
83 | 84 | 85 | @include('partials.sidebar') 86 | 87 |
88 |
89 |
90 |
91 | 92 | 93 | @endsection 94 | 95 | 96 | -------------------------------------------------------------------------------- /cms/resources/views/categories/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app'); 2 | 3 | 4 | 5 | @section('content'); 6 | 7 | 8 |
9 | 10 |
11 | 12 | {{ isset($category) ? 'Edit Category' : 'Create category' }} 13 | 14 |
15 | 16 |
17 | 18 | @include('partials.errors') 19 | 20 |
21 | @csrf 22 | 23 | @if(isset($category)) 24 | 25 | @method('PUT') 26 | 27 | @endif 28 | 29 |
30 | 31 | 32 | 33 | 34 | 35 |
36 | 37 |
38 | 39 | 44 | 45 |
46 | 47 |
48 | 49 |
50 | 51 |
52 | 53 | @endsection -------------------------------------------------------------------------------- /cms/resources/views/categories/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app'); 2 | 3 | 4 | 5 | @section('content'); 6 | 7 |
8 | 9 | Add Category 10 | 11 |
12 | 13 |
14 | 15 |
Categories
16 | 17 |
18 | 19 | @if($categories->count() > 0) 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | @foreach($categories as $category) 37 | 38 | 39 | 40 | 45 | 46 | 51 | 52 | 60 | 61 | 62 | @endforeach 63 | 64 | 65 | 66 | 67 |
NamePosts count
41 | 42 | {{ $category->name }} 43 | 44 | 47 | 48 | {{ $category->posts->count() }} 49 | 50 | 53 | 54 | Edit 55 | 56 | 57 | 58 | 59 |
68 | 69 | 70 | 102 | 103 | 104 | 105 | 106 | 107 | 108 |
109 | 110 | @else 111 | 112 |

No categories yet

113 | 114 | @endif 115 | 116 |
117 | 118 | 119 | 120 | @endsection 121 | 122 | @section('scripts') 123 | 124 | 139 | 140 | @endsection -------------------------------------------------------------------------------- /cms/resources/views/home.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Dashboard
9 | 10 |
11 | @if (session('status')) 12 | 15 | @endif 16 | 17 | You are logged in! 18 |
19 |
20 |
21 |
22 |
23 | @endsection 24 | -------------------------------------------------------------------------------- /cms/resources/views/layouts/app.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | {{ config('app.name', 'Laravel') }} 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 25 | @yield('css') 26 | 27 | 28 | 29 |
30 | 88 | 89 |
90 | 91 | @auth 92 | 93 |
94 | 95 | @if(session()->has('success')) 96 | 97 |
98 | 99 | {{ session()->get('success') }} 100 | 101 |
102 | 103 | @endif 104 | 105 | 106 | @if(session()->has('error')) 107 | 108 |
109 | 110 | {{ session()->get('error') }} 111 | 112 |
113 | 114 | @endif 115 | 116 |
117 | 118 |
119 | 120 |
    121 | 122 |
  • 123 | 124 | Posts 125 | 126 |
  • 127 | 128 | @if(auth()->user()->isAdmin()) 129 | 130 |
  • 131 | 132 | 133 | 134 | Users 135 | 136 | 137 | 138 |
  • 139 | 140 | @endif 141 | 142 | 143 |
  • 144 | 145 | Tags 146 | 147 |
  • 148 | 149 |
  • 150 | 151 | categories 152 | 153 |
  • 154 | 155 |
156 | 157 | 166 | 167 | 168 |
169 | 170 |
171 | 172 | @yield('content') 173 | 174 |
175 | 176 |
177 | 178 |
179 | 180 | @else 181 | 182 | @yield('content') 183 | 184 | @endauth 185 | 186 |
187 |
188 | 189 | 192 | 193 | 194 | 195 | 196 | 197 | @yield('scripts') 198 | 199 | 200 | 201 | -------------------------------------------------------------------------------- /cms/resources/views/layouts/blog.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | @yield('header') 10 | 11 | 12 | 13 | @yield('title') 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 53 | 54 | 55 | 56 | @yield('content') 57 | 58 | 59 | 60 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /cms/resources/views/partials/errors.blade.php: -------------------------------------------------------------------------------- 1 | @if($errors->any()) 2 | 3 |
4 | 5 | 18 | 19 |
20 | 21 | @endif -------------------------------------------------------------------------------- /cms/resources/views/partials/sidebar.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 74 |
-------------------------------------------------------------------------------- /cms/resources/views/posts/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 | 5 |
6 | 7 |
8 | 9 | {{ isset($post) ? 'Edit Post': 'Create Post' }} 10 | 11 |
12 | 13 |
14 | 15 | 36 | 37 | @include('partials.errors') 38 | 39 |
40 | 41 | @csrf 42 | 43 | @if(isset($post)) 44 | 45 | @method('PUT') 46 | 47 | @endif 48 | 49 |
50 | 51 | 52 | 53 | 54 | 55 |
56 | 57 |
58 | 59 | 60 | 61 | 62 | 63 |
64 | 65 |
66 | 67 | 68 | 69 | 70 | 71 |
72 | 73 |
74 | 75 | 76 | 77 | 78 | 79 |
80 | 81 | @if( isset($post)) 82 | 83 |
84 | 85 | 86 | 87 |
88 | @endif 89 | 90 |
91 | 92 | 93 | 94 | 95 | 96 |
97 | 98 |
99 | 100 | 101 | 102 | 126 | 127 |
128 | 129 | 130 | @if($tags->count() > 0) 131 | 132 |
133 | 134 | 135 | 136 | 160 | 161 |
162 | @endif 163 | 164 |
165 | 166 | 171 | 172 |
173 | 174 |
175 | 176 |
177 | 178 |
179 | 180 | @endsection 181 | 182 | @section('scripts') 183 | 184 | 185 | 186 | 187 | 188 | 199 | 200 | @endsection 201 | 202 | 203 | @section('css') 204 | 205 | 206 | 207 | 208 | 209 | @endsection -------------------------------------------------------------------------------- /cms/resources/views/posts/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | 4 | @section('content') 5 | 6 |
7 | 8 | Add Post 9 | 10 |
11 | 12 |
13 | 14 |
Posts
15 | 16 | 17 |
18 | @if($posts->count() > 0) 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | @foreach($posts as $post) 38 | 39 | 40 | 41 | 56 | 57 | 62 | 63 | 70 | 71 | @if(!$post->trashed()) 72 | 77 | @else 78 | 89 | @endif 90 | 91 | 107 | 108 | 109 | 110 | @endforeach 111 | 112 | 113 | 114 |
ImageTitleCategory
42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 58 | 59 | {{ $post->title }} 60 | 61 | 64 | 65 | 66 | {{ $post->category->name }} 67 | 68 | 69 | 73 | 74 | Edit 75 | 76 | 79 | 80 |
81 | @csrf 82 | 83 | @method('PUT') 84 | 85 | 86 |
87 | 88 |
92 | 93 |
94 | 95 | @csrf 96 | 97 | @method('DELETE') 98 | 99 | 103 | 104 |
105 | 106 |
115 | @else 116 | 117 |

No posts yet

118 | 119 | @endif 120 | 121 |
122 | 123 |
124 | 125 | @endsection -------------------------------------------------------------------------------- /cms/resources/views/tags/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app'); 2 | 3 | 4 | 5 | @section('content'); 6 | 7 | 8 |
9 | 10 |
11 | 12 | {{ isset($tag) ? 'Edit tag' : 'Create tag' }} 13 | 14 |
15 | 16 |
17 | 18 | @include('partials.errors') 19 | 20 |
21 | @csrf 22 | 23 | @if(isset($tag)) 24 | 25 | @method('PUT') 26 | 27 | @endif 28 | 29 |
30 | 31 | 32 | 33 | 34 | 35 |
36 | 37 |
38 | 39 | 44 | 45 |
46 | 47 |
48 | 49 |
50 | 51 |
52 | 53 | @endsection -------------------------------------------------------------------------------- /cms/resources/views/tags/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app'); 2 | 3 | 4 | 5 | @section('content'); 6 | 7 |
8 | 9 | Add tag 10 | 11 |
12 | 13 |
14 | 15 |
tags
16 | 17 |
18 | 19 | @if($tags->count() > 0) 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | @foreach($tags as $tag) 37 | 38 | 39 | 40 | 45 | 46 | 51 | 52 | 60 | 61 | 62 | @endforeach 63 | 64 | 65 | 66 | 67 |
NameTags count
41 | 42 | {{ $tag->name }} 43 | 44 | 47 | 48 | {{ $tag->posts->count() }} 49 | 50 | 53 | 54 | Edit 55 | 56 | 57 | 58 | 59 |
68 | 69 | 70 | 102 | 103 | 104 | 105 | 106 | 107 | 108 |
109 | 110 | @else 111 | 112 |

No tags yet

113 | 114 | @endif 115 | 116 |
117 | 118 |
119 | 120 | @endsection 121 | 122 | @section('scripts') 123 | 124 | 139 | 140 | @endsection -------------------------------------------------------------------------------- /cms/resources/views/users/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 | 5 |
6 |
My Profile
7 | 8 |
9 | @include('partials.errors') 10 |
11 | @csrf 12 | @method('PUT') 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
32 |
33 |
34 |
35 | @endsection 36 | -------------------------------------------------------------------------------- /cms/resources/views/users/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | 4 | @section('content') 5 | 6 |
7 | 8 | Add Post 9 | 10 |
11 | 12 |
13 | 14 |
Users
15 | 16 | 17 |
18 | @if($users->count() > 0) 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | @foreach($users as $user) 38 | 39 | 40 | 41 | 46 | 47 | 52 | 53 | 54 | 59 | 60 | 74 | 75 | 76 | 77 | @endforeach 78 | 79 | 80 | 81 |
ImageNameEmail
42 | 43 | 44 | 45 | 48 | 49 | {{ $user->name }} 50 | 51 | 55 | 56 | {{ $user->email }} 57 | 58 | 61 | 62 | @if(!$user->isAdmin()) 63 | 64 |
65 | @csrf 66 | 67 | 68 | 69 |
70 | 71 | @endif 72 | 73 |
82 | @else 83 | 84 |

No users yet

85 | 86 | @endif 87 | 88 |
89 | 90 |
91 | 92 | @endsection -------------------------------------------------------------------------------- /cms/resources/views/vendor/pagination/bootstrap-4.blade.php: -------------------------------------------------------------------------------- 1 | @if ($paginator->hasPages()) 2 | 44 | @endif 45 | 46 | 47 | 48 | 49 | 68 | 69 | -------------------------------------------------------------------------------- /cms/resources/views/vendor/pagination/default.blade.php: -------------------------------------------------------------------------------- 1 | @if ($paginator->hasPages()) 2 | 44 | @endif 45 | -------------------------------------------------------------------------------- /cms/resources/views/vendor/pagination/semantic-ui.blade.php: -------------------------------------------------------------------------------- 1 | @if ($paginator->hasPages()) 2 | 36 | @endif 37 | -------------------------------------------------------------------------------- /cms/resources/views/vendor/pagination/simple-bootstrap-4.blade.php: -------------------------------------------------------------------------------- 1 | 26 | 27 | 28 | @if ($paginator->hasPages()) 29 | 30 | 47 | 48 | @endif 49 | 50 | -------------------------------------------------------------------------------- /cms/resources/views/vendor/pagination/simple-default.blade.php: -------------------------------------------------------------------------------- 1 | @if ($paginator->hasPages()) 2 | 17 | @endif 18 | -------------------------------------------------------------------------------- /cms/resources/views/welcome.blade.php: -------------------------------------------------------------------------------- 1 | 2 | @extends('layouts.blog') 3 | 4 | @section('title') 5 | 6 | TheSaaS Blog 7 | 8 | @endsection 9 | 10 | 11 | 12 | 13 | @section('header') 14 | 15 | 16 |
17 |
18 | 19 |
20 |
21 | 22 |

Latest Blog Posts

23 |

Read and get updated on how we progress

24 | 25 |
26 |
27 | 28 |
29 |
30 | 31 | @endsection 32 | 33 | 34 | 35 | @section('content') 36 | 37 | 38 |
39 |
40 |
41 |
42 | 43 | 44 |
45 |
46 | 47 | @forelse($posts as $post) 48 | 49 |
50 |
51 | Card image cap 52 | 64 |
65 |
66 | 67 | @empty 68 | 69 |

70 | No results found for query {{ request()->query('search') }} 71 |

72 | @endforelse 73 | 74 |
75 | 76 | 77 | 81 | {{ $posts->appends(['search'=>request()->query('search') ])->links() }} 82 |
83 | 84 | 85 | 86 | @include('partials.sidebar') 87 | 88 |
89 |
90 |
91 |
92 | 93 | 94 | @endsection 95 | 96 | 97 | -------------------------------------------------------------------------------- /cms/routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 17 | return $request->user(); 18 | }); 19 | -------------------------------------------------------------------------------- /cms/routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 16 | }); 17 | -------------------------------------------------------------------------------- /cms/routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 18 | })->describe('Display an inspiring quote'); 19 | -------------------------------------------------------------------------------- /cms/routes/web.php: -------------------------------------------------------------------------------- 1 | name('welcome'); 17 | 18 | Route::get('blog/posts/{post}', [PostsController::class, 'show'])->name('blog.show'); 19 | 20 | Route::get('blog/categories/{category}', [PostsController::class, 'category'])->name('blog.category'); 21 | 22 | Route::get('blog/tags/{tag}', [PostsController::class, 'tag'])->name('blog.tag'); 23 | 24 | Auth::routes(); 25 | 26 | Route::get('/home', 'HomeController@index')->name('home'); 27 | Route::resource('categories', 'CategoriesController'); 28 | 29 | Route::resource('posts', 'PostsController')->middleware(['auth']); 30 | Route::resource('tags', 'TagsController'); 31 | Route::get('trashed-posts', 'PostsController@trashed')->name('trashed-posts.index'); 32 | Route::put('restore-post/{post}', 'PostsController@restore')->name('restore-posts'); 33 | 34 | 35 | Route::middleware(['auth', 'admin'])->group(function() { 36 | 37 | Route::get('users/profile', 'UsersController@edit')->name('users.edit-profile'); 38 | 39 | Route::put('users/profile', 'UsersController@update')->name('users.update-profile'); 40 | 41 | Route::get('users', 'UsersController@index')->name('users.index'); 42 | 43 | Route::post('users/{user}/make-admin', 'UsersController@makeAdmin')->name('users.make-admin'); 44 | }); -------------------------------------------------------------------------------- /cms/server.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | $uri = urldecode( 11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 12 | ); 13 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 15 | // built-in PHP web server. This provides a convenient way to test a Laravel 16 | // application without having installed a "real" web server software here. 17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /cms/storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /cms/storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /cms/storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | config.php 2 | routes.php 3 | schedule-* 4 | compiled.php 5 | services.json 6 | events.scanned.php 7 | routes.scanned.php 8 | down 9 | -------------------------------------------------------------------------------- /cms/storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /cms/storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /cms/storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /cms/storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /cms/storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /cms/storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /cms/tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /cms/tests/Feature/ExampleTest.php: -------------------------------------------------------------------------------- 1 | get('/'); 18 | 19 | $response->assertStatus(200); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /cms/tests/TestCase.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /cms/webpack.mix.js: -------------------------------------------------------------------------------- 1 | const mix = require('laravel-mix'); 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Mix Asset Management 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Mix provides a clean, fluent API for defining some Webpack build steps 9 | | for your Laravel application. By default, we are compiling the Sass 10 | | file for the application as well as bundling up all the JS files. 11 | | 12 | */ 13 | 14 | mix.js('resources/js/app.js', 'public/js') 15 | .sass('resources/sass/app.scss', 'public/css'); 16 | --------------------------------------------------------------------------------