Skip to content
Permalink
Browse files

Practica subida

  • Loading branch information...
larryrider committed May 16, 2018
1 parent c760f17 commit dfe3cdd6351177c40e988d4543bf8b2e278d8c41
Showing with 90,550 additions and 0 deletions.
  1. +33 −0 .env.example
  2. +5 −0 .gitattributes
  3. +12 −0 .gitignore
  4. BIN Captura0.png
  5. BIN Captura1.png
  6. BIN Captura2.png
  7. BIN Captura3.png
  8. BIN Captura4.png
  9. BIN Captura5.png
  10. BIN Captura6.png
  11. +23 −0 app/Actor.php
  12. +21 −0 app/Category.php
  13. +31 −0 app/Chapter.php
  14. +40 −0 app/Console/Kernel.php
  15. +21 −0 app/Director.php
  16. +65 −0 app/Exceptions/Handler.php
  17. +47 −0 app/Http/Controllers/ActorController.php
  18. +32 −0 app/Http/Controllers/AdminController.php
  19. +32 −0 app/Http/Controllers/Auth/ForgotPasswordController.php
  20. +39 −0 app/Http/Controllers/Auth/LoginController.php
  21. +71 −0 app/Http/Controllers/Auth/RegisterController.php
  22. +39 −0 app/Http/Controllers/Auth/ResetPasswordController.php
  23. +47 −0 app/Http/Controllers/CategoryController.php
  24. +34 −0 app/Http/Controllers/ChapterController.php
  25. +13 −0 app/Http/Controllers/Controller.php
  26. +42 −0 app/Http/Controllers/DirectorController.php
  27. +48 −0 app/Http/Controllers/HomeController.php
  28. +25 −0 app/Http/Controllers/ReviewController.php
  29. +262 −0 app/Http/Controllers/SerieController.php
  30. +61 −0 app/Http/Kernel.php
  31. +32 −0 app/Http/Middleware/Admin.php
  32. +17 −0 app/Http/Middleware/EncryptCookies.php
  33. +26 −0 app/Http/Middleware/RedirectIfAuthenticated.php
  34. +18 −0 app/Http/Middleware/TrimStrings.php
  35. +17 −0 app/Http/Middleware/VerifyCsrfToken.php
  36. +29 −0 app/Providers/AppServiceProvider.php
  37. +30 −0 app/Providers/AuthServiceProvider.php
  38. +21 −0 app/Providers/BroadcastServiceProvider.php
  39. +32 −0 app/Providers/EventServiceProvider.php
  40. +73 −0 app/Providers/RouteServiceProvider.php
  41. +41 −0 app/Review.php
  42. +105 −0 app/Serie.php
  43. +34 −0 app/User.php
  44. +51 −0 artisan
  45. +55 −0 bootstrap/app.php
  46. +17 −0 bootstrap/autoload.php
  47. +2 −0 bootstrap/cache/.gitignore
  48. +51 −0 composer.json
  49. +3,451 −0 composer.lock
  50. +231 −0 config/app.php
  51. +102 −0 config/auth.php
  52. +58 −0 config/broadcasting.php
  53. +91 −0 config/cache.php
  54. +120 −0 config/database.php
  55. +68 −0 config/filesystems.php
  56. +123 −0 config/mail.php
  57. +85 −0 config/queue.php
  58. +38 −0 config/services.php
  59. +179 −0 config/session.php
  60. +33 −0 config/view.php
  61. +1 −0 database/.gitignore
  62. +24 −0 database/factories/ModelFactory.php
  63. +36 −0 database/migrations/2014_10_12_000000_create_users_table.php
  64. +32 −0 database/migrations/2014_10_12_100000_create_password_resets_table.php
  65. +32 −0 database/migrations/2017_01_12_124147_create_directors_table.php
  66. +48 −0 database/migrations/2018_01_12_093311_create_series_table.php
  67. +36 −0 database/migrations/2018_01_12_094021_create_chapters_table.php
  68. +32 −0 database/migrations/2018_01_12_124122_create_actors_table.php
  69. +32 −0 database/migrations/2018_01_12_124215_create_categories_table.php
  70. +34 −0 database/migrations/2018_01_15_155847_create_categories_series_table.php
  71. +34 −0 database/migrations/2018_01_24_003550_create_actor_serie_table.php
  72. +37 −0 database/migrations/2018_01_24_173700_create_reviews_table.php
  73. +284 −0 database/seeds/ActorsSeriesTableSeeder.php
  74. +227 −0 database/seeds/ActorsTableSeeder.php
  75. +221 −0 database/seeds/CategoriesSeriesTableSeeder.php
  76. +44 −0 database/seeds/CategoriesTableSeeder.php
  77. +257 −0 database/seeds/ChaptersTableSeeder.php
  78. +24 −0 database/seeds/DatabaseSeeder.php
  79. +86 −0 database/seeds/DirectorsTableSeeder.php
  80. +29 −0 database/seeds/ReviewsTableSeeder.php
  81. +238 −0 database/seeds/SeriesTableSeeder.php
  82. +37 −0 database/seeds/UsersTableSeeder.php
  83. BIN netflix.png
  84. +21 −0 package.json
  85. +31 −0 phpunit.xml
  86. +20 −0 public/.htaccess
  87. +5 −0 public/css/app.css
  88. +23,464 −0 public/css/home.css
  89. +5,870 −0 public/css/login.css
  90. +27,438 −0 public/css/serie.css
  91. +7,068 −0 public/css/slider.css
  92. +5,552 −0 public/css/welcome.css
  93. BIN public/favicon.ico
  94. BIN public/fonts/fontawesome-webfont.ttf
  95. BIN public/imagen.jpg
  96. BIN public/img/ES-es-20180101-popsignuptwoweeks-perspective_alpha_website_large.jpg
  97. BIN public/img/ES-es-20180101-popsignuptwoweeks-perspective_alpha_website_medium.jpg
  98. BIN public/img/ES-es-20180101-popsignuptwoweeks-perspective_alpha_website_small.jpg
  99. BIN public/img/FB-f-Logo__blue_57.png
  100. +67 −0 public/img/cancel.svg
  101. BIN public/img/login-the-crown_2-1500x1000.jpg
  102. +64 −0 public/img/logo.svg
  103. BIN public/img/netflix-app-icon_152.jpg
  104. BIN public/img/netflix_portada.png
  105. BIN public/img/netflix_portada_titulo.png
  106. BIN public/img/nficon2016.ico
  107. BIN public/img/nficon2016.png
  108. +85 −0 public/img/pickprice.svg
  109. BIN public/img/previews/13razones.webp
  110. BIN public/img/previews/arrow.webp
  111. BIN public/img/previews/blackmirror.webp
  112. BIN public/img/previews/chicascable.webp
  113. BIN public/img/previews/comoconoci.webp
  114. BIN public/img/previews/daredevil.webp
  115. BIN public/img/previews/friends.webp
  116. BIN public/img/previews/gotham.webp
  117. BIN public/img/previews/horrorstory.webp
  118. BIN public/img/previews/lukecage.webp
  119. BIN public/img/previews/modernfamily.webp
  120. BIN public/img/previews/narcos.jpg
  121. BIN public/img/previews/orange.jpg
  122. BIN public/img/previews/orphanblack.webp
  123. BIN public/img/previews/rickymorty.webp
  124. BIN public/img/previews/spartacus.webp
  125. BIN public/img/previews/stranger.jpg
  126. BIN public/img/previews/theend.webp
  127. BIN public/img/previews/viajeros.jpg
  128. BIN public/img/previews/vikingos.webp
  129. BIN public/img/series/13razones.png
  130. BIN public/img/series/arrow.png
  131. BIN public/img/series/blackmirror.jpg
  132. BIN public/img/series/chicascable.jpg
  133. BIN public/img/series/comoconoci.jpg
  134. BIN public/img/series/daredevil.jpg
  135. BIN public/img/series/friends.png
  136. BIN public/img/series/gotham.jpg
  137. BIN public/img/series/horrorstory.jpg
  138. BIN public/img/series/lukecage.jpg
  139. BIN public/img/series/modernfamily.jpg
  140. BIN public/img/series/narcos.jpg
  141. BIN public/img/series/orange.png
  142. BIN public/img/series/orphanblack.jpg
  143. BIN public/img/series/rickymorty.jpg
  144. BIN public/img/series/spartacus.jpg
  145. BIN public/img/series/stranger.png
  146. BIN public/img/series/theend.jpg
  147. BIN public/img/series/viajeros.jpg
  148. BIN public/img/series/vikingos.jpg
  149. BIN public/img/user_icon.png
  150. +70 −0 public/img/watchanywhere.svg
  151. +58 −0 public/index.php
  152. +34 −0 public/js/app.js
  153. +6 −0 public/js/jquery-1.12.4.js
  154. +6 −0 public/js/jquery-migrate.min-1.12.4.js
  155. +75 −0 public/js/net-slider.js
  156. +18 −0 public/js/slick.min.js
  157. +77 −0 public/js/video-drop.js
  158. BIN public/original.jpg
  159. BIN public/preview.jpg
  160. +2 −0 public/robots.txt
  161. +23 −0 public/web.config
  162. +75 −0 readme.md
  163. +22 −0 resources/assets/js/app.js
  164. +53 −0 resources/assets/js/bootstrap.js
  165. +23 −0 resources/assets/js/components/Example.vue
  166. +38 −0 resources/assets/sass/_variables.scss
  167. +9 −0 resources/assets/sass/app.scss
  168. +19 −0 resources/lang/en/auth.php
  169. +19 −0 resources/lang/en/pagination.php
  170. +22 −0 resources/lang/en/passwords.php
  171. +121 −0 resources/lang/en/validation.php
  172. +376 −0 resources/views/admin/admin.blade.php
  173. +406 −0 resources/views/admin/deleteActor.blade.php
  174. +406 −0 resources/views/admin/deleteCategory.blade.php
  175. +406 −0 resources/views/admin/deleteDirector.blade.php
  176. +407 −0 resources/views/admin/deleteSeason.blade.php
  177. +407 −0 resources/views/admin/deleteSerie.blade.php
  178. +412 −0 resources/views/admin/editActor.blade.php
  179. +412 −0 resources/views/admin/editCategory.blade.php
  180. +468 −0 resources/views/admin/editChapter.blade.php
  181. +412 −0 resources/views/admin/editDirector.blade.php
  182. +601 −0 resources/views/admin/editSerie.blade.php
  183. +376 −0 resources/views/admin/newActor.blade.php
  184. +376 −0 resources/views/admin/newCategory.blade.php
  185. +390 −0 resources/views/admin/newChapter.blade.php
  186. +376 −0 resources/views/admin/newDirector.blade.php
  187. +415 −0 resources/views/admin/newSeason.blade.php
  188. +517 −0 resources/views/admin/newSerie.blade.php
  189. +237 −0 resources/views/auth/auth.blade.php
  190. +66 −0 resources/views/auth/login.blade.php
  191. +47 −0 resources/views/auth/passwords/email.blade.php
  192. +70 −0 resources/views/auth/passwords/reset.blade.php
  193. +80 −0 resources/views/auth/register.blade.php
  194. +407 −0 resources/views/browse.blade.php
  195. +534 −0 resources/views/home.blade.php
  196. +80 −0 resources/views/layouts/app.blade.php
  197. +665 −0 resources/views/serie/detalles.blade.php
  198. +460 −0 resources/views/serie/episodios.blade.php
  199. +506 −0 resources/views/serie/serie.blade.php
  200. +442 −0 resources/views/serie/similares.blade.php
  201. +422 −0 resources/views/series.blade.php
  202. +551 −0 resources/views/welcome.blade.php
  203. +18 −0 routes/api.php
  204. +16 −0 routes/channels.php
  205. +18 −0 routes/console.php
  206. +81 −0 routes/web.php
  207. +21 −0 server.php
  208. +3 −0 storage/app/.gitignore
  209. +2 −0 storage/app/public/.gitignore
  210. +8 −0 storage/framework/.gitignore
  211. +2 −0 storage/framework/cache/.gitignore
  212. +2 −0 storage/framework/sessions/.gitignore
  213. +2 −0 storage/framework/testing/.gitignore
  214. +2 −0 storage/framework/views/.gitignore
  215. +2 −0 storage/logs/.gitignore
  216. +22 −0 tests/CreatesApplication.php
  217. +23 −0 tests/Feature/ExampleTest.php
  218. +10 −0 tests/TestCase.php
  219. +20 −0 tests/Unit/ExampleTest.php
  220. +15 −0 webpack.mix.js
@@ -0,0 +1,33 @@
APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:V/C4jE+761fUo9Q7svGoPZAHrT4MsVcq600l8yIsN/0=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=netflix
DB_USERNAME=netflix
DB_PASSWORD=netflix

BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
@@ -0,0 +1,5 @@
* text=auto
*.css linguist-vendored
*.scss linguist-vendored
*.js linguist-vendored
CHANGELOG.md export-ignore
@@ -0,0 +1,12 @@
/node_modules
/public/hot
/public/storage
/storage/*.key
/vendor
/.idea
/.vagrant
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
.env
BIN +1.43 MB Captura0.png
Binary file not shown.
BIN +1.66 MB Captura1.png
Binary file not shown.
BIN +1.13 MB Captura2.png
Binary file not shown.
BIN +942 KB Captura3.png
Binary file not shown.
BIN +600 KB Captura4.png
Binary file not shown.
BIN +165 KB Captura5.png
Binary file not shown.
BIN +58.7 KB Captura6.png
Binary file not shown.
@@ -0,0 +1,23 @@
<?php
namespace App;
use App\Serie;
use Illuminate\Database\Eloquent\Model;
class Actor extends Model
{
public static function createActor($request) {
if($request->has('name')){
$actor = new Actor();
$actor->name = $request->name;
$actor->save();
}
}
public function serie() {
return $this->belongsToMany('App\Serie');
}
}
@@ -0,0 +1,21 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Category extends Model
{
public static function createCategory($request) {
if($request->has('category')){
$category = new Category();
$category->category = $request->category;
$category->save();
}
}
public function series()
{
return $this->belongsToMany('App\Serie','category_serie');
}
}
@@ -0,0 +1,31 @@
<?php
namespace App;
use App\Serie;
use Illuminate\Database\Eloquent\Model;
class Chapter extends Model
{
public static function create($s,$season,$title,$desc) {
$c = new Chapter();
$c->title = $title;
$c->description = $desc;
$c->season = $season;
$c->serie()->associate($s);
$c->save();
}
public static function deleteChapters($id,$season){
$chapters = Chapter::where('season',$season)->where('serie_id',$id)->get();
foreach($chapters as $c){
$c->delete();
}
}
public function serie()
{
return $this->belongsTo('App\Serie');
}
}
@@ -0,0 +1,40 @@
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
//
];
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
// $schedule->command('inspire')
// ->hourly();
}
/**
* Register the Closure based commands for the application.
*
* @return void
*/
protected function commands()
{
require base_path('routes/console.php');
}
}
@@ -0,0 +1,21 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Director extends Model
{
public static function createDirector($request) {
$dir = new Director();
if($request->has('name')){
$dir->name = $request->name;
$dir->save();
}
}
public function series()
{
return $this->hasMany('App\Serie');
}
}
@@ -0,0 +1,65 @@
<?php
namespace App\Exceptions;
use Exception;
use Illuminate\Auth\AuthenticationException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
class Handler extends ExceptionHandler
{
/**
* A list of the exception types that should not be reported.
*
* @var array
*/
protected $dontReport = [
\Illuminate\Auth\AuthenticationException::class,
\Illuminate\Auth\Access\AuthorizationException::class,
\Symfony\Component\HttpKernel\Exception\HttpException::class,
\Illuminate\Database\Eloquent\ModelNotFoundException::class,
\Illuminate\Session\TokenMismatchException::class,
\Illuminate\Validation\ValidationException::class,
];
/**
* Report or log an exception.
*
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
*
* @param \Exception $exception
* @return void
*/
public function report(Exception $exception)
{
parent::report($exception);
}
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $exception
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $exception)
{
return parent::render($request, $exception);
}
/**
* Convert an authentication exception into an unauthenticated response.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Auth\AuthenticationException $exception
* @return \Illuminate\Http\Response
*/
protected function unauthenticated($request, AuthenticationException $exception)
{
if ($request->expectsJson()) {
return response()->json(['error' => 'Unauthenticated.'], 401);
}
return redirect()->guest(route('login'));
}
}
@@ -0,0 +1,47 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Actor;
class ActorController extends Controller
{
public function index()
{
return view('admin.newActor');
}
public function editActor()
{
$actor = Actor::all();
return view('admin.editActor', ['actors' => $actor]);
}
public function deleteActor()
{
$actor = Actor::all();
return view('admin.deleteActor', ['actors' => $actor]);
}
public function create(Request $request)
{
Actor::createActor($request);
return redirect()->action('ActorController@index');
}
public function edit(Request $request)
{
$d = Actor::find($request->id);
$d->name = $request->name;
$d->save();
return redirect()->action('ActorController@editActor');
}
public function delete(Request $request){
$dir = Actor::find($request->actor);
$dir->delete();
return redirect()->action('ActorController@deleteActor');
}
}
@@ -0,0 +1,32 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Serie;
use App\Category;
use Illuminate\Support\Facades\DB;
class AdminController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
}
/**
* Show the application dashboard.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
return view('admin.admin');
}
}
@@ -0,0 +1,32 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
class ForgotPasswordController extends Controller
{
/*
|--------------------------------------------------------------------------
| Password Reset Controller
|--------------------------------------------------------------------------
|
| This controller is responsible for handling password reset emails and
| includes a trait which assists in sending these notifications from
| your application to your users. Feel free to explore this trait.
|
*/
use SendsPasswordResetEmails;
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
}

0 comments on commit dfe3cdd

Please sign in to comment.
You can’t perform that action at this time.