This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from HE-Arc/dev
Dev to main
- Loading branch information
Showing
12 changed files
with
320 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,6 @@ yarn-error.log | |
/.fleet | ||
/.idea | ||
/.vscode | ||
app/Http/Controllers/TestController.php | ||
resources/views/test.blade.php | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,11 +12,12 @@ class DatabaseSeeder extends Seeder | |
*/ | ||
public function run(): void | ||
{ | ||
// \App\Models\User::factory(10)->create(); | ||
|
||
// \App\Models\User::factory()->create([ | ||
// 'name' => 'Test User', | ||
// 'email' => '[email protected]', | ||
// ]); | ||
$this->call(UsersTableSeeder::class); | ||
$this->call(FilmsTableSeeder::class); | ||
$this->call(SeriesTableSeeder::class); | ||
$this->call(ListesTableSeeder::class); | ||
$this->call(SerieListeTableSeeder::class); | ||
$this->call(FilmListeTableSeeder::class); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
|
||
namespace Database\Seeders; | ||
|
||
use Illuminate\Database\Console\Seeds\WithoutModelEvents; | ||
use Illuminate\Database\Seeder; | ||
use App\Models\FilmListe; | ||
|
||
class FilmListeTableSeeder extends Seeder | ||
{ | ||
/** | ||
* Run the database seeds. | ||
*/ | ||
public function run() | ||
{ | ||
FilmListe::create([ | ||
'liste_id' => 1, | ||
'film_id' => 1, | ||
]); | ||
|
||
FilmListe::create([ | ||
'liste_id' => 1, | ||
'film_id' => 2, | ||
]); | ||
|
||
FilmListe::create([ | ||
'liste_id' => 2, | ||
'film_id' => 3, | ||
]); | ||
|
||
FilmListe::create([ | ||
'liste_id' => 3, | ||
'film_id' => 1, | ||
]); | ||
|
||
FilmListe::create([ | ||
'liste_id' => 3, | ||
'film_id' => 2, | ||
]); | ||
|
||
FilmListe::create([ | ||
'liste_id' => 3, | ||
'film_id' => 3, | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
namespace Database\Seeders; | ||
|
||
use Illuminate\Database\Console\Seeds\WithoutModelEvents; | ||
use Illuminate\Database\Seeder; | ||
use App\Models\Film; | ||
|
||
class FilmsTableSeeder extends Seeder | ||
{ | ||
/** | ||
* Run the database seeds. | ||
*/ | ||
public function run() | ||
{ | ||
Film::create([ | ||
'nom' => 'Film trop cool', | ||
'date_sortie' => '2023-10-08', | ||
'urlImage' => 'https://picsum.photos/200/300', | ||
'created_at' => '2023-10-17 14:34:43', | ||
'updated_at' => '2023-10-18 14:34:43', | ||
]); | ||
|
||
Film::create([ | ||
'nom' => 'Film assez bien', | ||
'date_sortie' => '2023-10-08', | ||
'urlImage' => 'https://picsum.photos/200/300', | ||
'created_at' => '2023-10-17 14:34:43', | ||
'updated_at' => '2023-10-18 14:34:43', | ||
]); | ||
|
||
Film::create([ | ||
'nom' => 'Film bof', | ||
'date_sortie' => '2023-10-08', | ||
'urlImage' => 'https://picsum.photos/200/300', | ||
'created_at' => '2023-10-17 14:34:43', | ||
'updated_at' => '2023-10-18 14:34:43', | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
namespace Database\Seeders; | ||
|
||
use Illuminate\Database\Console\Seeds\WithoutModelEvents; | ||
use Illuminate\Database\Seeder; | ||
use App\Models\Liste; | ||
|
||
class ListesTableSeeder extends Seeder | ||
{ | ||
/** | ||
* Run the database seeds. | ||
*/ | ||
public function run() | ||
{ | ||
Liste::create([ | ||
'nom' => 'SuperListe', | ||
'urlImage' => 'https://picsum.photos/200', | ||
'user_id' => 1, | ||
]); | ||
|
||
Liste::create([ | ||
'nom' => 'Franchement nul', | ||
'urlImage' => 'https://picsum.photos/200', | ||
'user_id' => 1, | ||
]); | ||
|
||
Liste::create([ | ||
'nom' => 'A regarder', | ||
'urlImage' => 'https://picsum.photos/200', | ||
'user_id' => 2, | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
|
||
namespace Database\Seeders; | ||
|
||
use Illuminate\Database\Console\Seeds\WithoutModelEvents; | ||
use Illuminate\Database\Seeder; | ||
use App\Models\SerieListe; | ||
|
||
class SerieListeTableSeeder extends Seeder | ||
{ | ||
/** | ||
* Run the database seeds. | ||
*/ | ||
public function run() | ||
{ | ||
SerieListe::create([ | ||
'liste_id' => 1, | ||
'serie_id' => 1, | ||
]); | ||
|
||
SerieListe::create([ | ||
'liste_id' => 2, | ||
'serie_id' => 2, | ||
]); | ||
|
||
SerieListe::create([ | ||
'liste_id' => 2, | ||
'serie_id' => 3, | ||
]); | ||
|
||
SerieListe::create([ | ||
'liste_id' => 3, | ||
'serie_id' => 1, | ||
]); | ||
|
||
SerieListe::create([ | ||
'liste_id' => 3, | ||
'serie_id' => 2, | ||
]); | ||
|
||
SerieListe::create([ | ||
'liste_id' => 3, | ||
'serie_id' => 3, | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
namespace Database\Seeders; | ||
|
||
use Illuminate\Database\Console\Seeds\WithoutModelEvents; | ||
use Illuminate\Database\Seeder; | ||
use App\Models\Serie; | ||
|
||
class SeriesTableSeeder extends Seeder | ||
{ | ||
/** | ||
* Run the database seeds. | ||
*/ | ||
public function run() | ||
{ | ||
Serie::create([ | ||
'nom' => 'Serie sympa', | ||
'date_sortie' => '2023-10-04', | ||
'urlImage' => 'https://picsum.photos/200/300', | ||
'created_at' => '2023-10-09 14:38:20', | ||
'updated_at' => '2023-10-11 14:38:20', | ||
]); | ||
|
||
Serie::create([ | ||
'nom' => 'Serie machin', | ||
'date_sortie' => '2023-10-04', | ||
'urlImage' => 'https://picsum.photos/200/300', | ||
'created_at' => '2023-10-09 14:38:20', | ||
'updated_at' => '2023-10-11 14:38:20', | ||
]); | ||
|
||
Serie::create([ | ||
'nom' => 'Serie truc', | ||
'date_sortie' => '2023-10-04', | ||
'urlImage' => 'https://picsum.photos/200/300', | ||
'created_at' => '2023-10-09 14:38:20', | ||
'updated_at' => '2023-10-11 14:38:20', | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
namespace Database\Seeders; | ||
|
||
use Illuminate\Database\Console\Seeds\WithoutModelEvents; | ||
use Illuminate\Database\Seeder; | ||
use App\Models\User; | ||
|
||
class UsersTableSeeder extends Seeder | ||
{ | ||
/** | ||
* Run the database seeds. | ||
*/ | ||
public function run(): void | ||
{ | ||
User::create([ | ||
'name' => 'Admini', | ||
'email' => '[email protected]', | ||
'password' => bcrypt('admin1234'), | ||
'created_at' => '2023-10-30 16:57:38', | ||
'updated_at' => '2023-10-30 16:57:38', | ||
'firstname' => 'Admini', | ||
'lastname' => 'Strator', | ||
'username' => 'admin', | ||
]); | ||
|
||
User::create([ | ||
'name' => 'Utili', | ||
'email' => '[email protected]', | ||
'password' => bcrypt('user1234'), | ||
'created_at' => '2023-10-30 17:00:23', | ||
'updated_at' => '2023-10-30 17:00:23', | ||
'firstname' => 'Utili', | ||
'lastname' => 'Sateur', | ||
'username' => 'user', | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
@extends("layout.app") | ||
|
||
@section("content") | ||
<div class="container-fluid"> | ||
<div class="row"> | ||
<div class="col-md-4"> | ||
<img alt="{{$film->nom}}" class="img-fluid h-100" src="{{$film->urlImage}}" /> | ||
</div> | ||
<div class="col-md-8"> | ||
<h3> | ||
{{$film->nom}} | ||
</h3> | ||
<p> | ||
{{$film->date_sortie}} | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
@endsection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
@extends("layout.app") | ||
|
||
@section("content") | ||
<div class="container-fluid"> | ||
<div class="row"> | ||
<div class="col-md-4"> | ||
<img alt="{{$serie->nom}}" class="img-fluid h-100" src="{{$serie->urlImage}}" /> | ||
</div> | ||
<div class="col-md-8"> | ||
<h3> | ||
{{$serie->nom}} | ||
</h3> | ||
<p> | ||
{{$serie->date_sortie}} | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
@endsection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters