-
Notifications
You must be signed in to change notification settings - Fork 22
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 #17 from karlomikus/develop
Version 0.4.0
- Loading branch information
Showing
42 changed files
with
1,520 additions
and
267 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
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
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,41 @@ | ||
<?php | ||
|
||
namespace Kami\Cocktail\Console\Commands; | ||
|
||
use Illuminate\Console\Command; | ||
use Symfony\Component\DomCrawler\Crawler; | ||
use Symfony\Component\HttpClient\HttpClient; | ||
use Symfony\Component\BrowserKit\HttpBrowser; | ||
use Symfony\Component\HttpKernel\HttpCache\Store; | ||
use Symfony\Component\HttpClient\CachingHttpClient; | ||
|
||
class TestScrap extends Command | ||
{ | ||
/** | ||
* The name and signature of the console command. | ||
* | ||
* @var string | ||
*/ | ||
protected $signature = 'bar:test'; | ||
|
||
/** | ||
* The console command description. | ||
* | ||
* @var string | ||
*/ | ||
protected $description = 'Command description'; | ||
|
||
/** | ||
* Execute the console command. | ||
* | ||
* @return int | ||
*/ | ||
public function handle() | ||
{ | ||
// $scraper = new \Kami\Cocktail\Scraper\Scraper('https://tuxedono2.com/vieux-carre-cocktail-recipe'); | ||
|
||
// dd($scraper->toArray()); | ||
|
||
return Command::SUCCESS; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Kami\Cocktail\Http\Controllers; | ||
|
||
use Illuminate\Http\Request; | ||
use Kami\Cocktail\Models\Glass; | ||
use Kami\Cocktail\Http\Resources\GlassResource; | ||
|
||
class GlassController extends Controller | ||
{ | ||
public function index() | ||
{ | ||
$glasses = Glass::orderBy('name')->get(); | ||
|
||
return GlassResource::collection($glasses); | ||
} | ||
|
||
public function show(int $id) | ||
{ | ||
$glass = Glass::findOrFail($id); | ||
|
||
return new GlassResource($glass); | ||
} | ||
} |
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
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
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
Oops, something went wrong.