This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Shop\Carousels\Repositories; | |
use App\Shop\Carousels\Carousel; | |
use App\Shop\Carousels\Exceptions\CarouselNotFoundException; | |
use App\Shop\Carousels\Exceptions\CreateCarouselErrorException; | |
use Illuminate\Database\Eloquent\ModelNotFoundException; | |
use Illuminate\Database\QueryException; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Shop\Carousels\Repositories; | |
use App\Shop\Carousels\Carousel; | |
use App\Shop\Carousels\Exceptions\CarouselNotFoundException; | |
use App\Shop\Carousels\Exceptions\CreateCarouselErrorException; | |
use Illuminate\Database\Eloquent\ModelNotFoundException; | |
use Illuminate\Database\QueryException; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Tests\Unit\Carousels; | |
use Tests\TestCase; | |
class CarouselUnitTest extends TestCase | |
{ | |
/** @test */ | |
public function it_returns_null_when_deleting_a_non_existing_carousel() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Tests\Feature\Admin\Carousels; | |
use Tests\TestCase; | |
class CarouselFeatureTest extends TestCase | |
{ | |
/** @test */ | |
public function it_can_show_the_create_carousel_page() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Route::namespace('Admin')->group(function () { | |
Route::resource('carousel', 'Carousels\CarouselController'); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers\Admin\Carousels; | |
use App\Http\Controllers\Controller; | |
class CarouselController extends Controller | |
{ | |
/** | |
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@extends('layouts.admin.app') | |
@section('content') | |
<!-- Main content --> | |
<section class="content"> | |
@include('layouts.errors-and-messages') | |
<div class="box"> | |
<div class="box-body"> | |
<form action="{{ route('admin.carousel.store') }}" method="post" enctype="multipart/form-data"> | |
{{ csrf_field() }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Tests\Feature\Admin\Carousels; | |
use Tests\TestCase; | |
class CarouselFeatureTest extends TestCase | |
{ | |
/** @test */ | |
public function it_can_create_the_carousel() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers\Admin\Carousels; | |
use App\Http\Controllers\Controller; | |
use App\Shop\Carousels\Exceptions\CarouselNotFoundException; | |
use App\Shop\Carousels\Exceptions\CreateCarouselErrorException; | |
use App\Shop\Carousels\Exceptions\UpdateCarouselErrorException; | |
use App\Shop\Carousels\Repositories\CarouselRepository; | |
use App\Shop\Carousels\Repositories\CarouselRepositoryInterface; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<env name="DB_CONNECTION" value="sqlite"/> | |
<env name="DB_DATABASE" value=":memory:"/> | |
<env name="API_DEBUG" value="false"/> | |
<ini name="memory_limit" value="512M" /> |