-
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.
I update. =>Edit controllers update methods. apply try-catch with proper notification. =>Edit libraries update methods remove try-catch. =>Edit library, update methods to their unique work. =>Make BasicTest, BookTest classes. and add methods on it. All work as expect.
- Loading branch information
Showing
12 changed files
with
289 additions
and
80 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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?php | ||
namespace App; | ||
|
||
class Box | ||
{ | ||
/** | ||
* @var array | ||
*/ | ||
protected $items = []; | ||
|
||
/** | ||
* Construct the box with the given items. | ||
* | ||
* @param array $items | ||
*/ | ||
public function __construct($items = []) | ||
{ | ||
$this->items = $items; | ||
} | ||
|
||
/** | ||
* Check if the specified item is in the box. | ||
* | ||
* @param string $item | ||
* @return bool | ||
*/ | ||
public function has($item) | ||
{ | ||
return in_array($item, $this->items); | ||
} | ||
|
||
/** | ||
* Remove an item from the box, or null if the box is empty. | ||
* | ||
* @return string | ||
*/ | ||
public function takeOne() | ||
{ | ||
return array_shift($this->items); | ||
} | ||
|
||
/** | ||
* Retrieve all items from the box that start with the specified letter. | ||
* | ||
* @param string $letter | ||
* @return array | ||
*/ | ||
public function startsWith($letter) | ||
{ | ||
return array_filter($this->items, function ($item) use ($letter) { | ||
return stripos($item, $letter) === 0; | ||
}); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php echo View::make('layouts.app'); ?> | ||
|
||
|
||
{{--<div class="container">--}} | ||
{{--<div class="row justify-content-center">--}} | ||
{{--<div class="col-md-8">--}} | ||
{{--<div class="card">--}} | ||
{{--<div class="card-header">Dashboard</div>--}} | ||
|
||
{{--<div class="card-body">--}} | ||
{{--if (session('status')){--}} | ||
{{--<div class="alert alert-success">--}} | ||
{{--{{ session('status') }}--}} | ||
{{--</div>--}} | ||
{{--}--}} | ||
|
||
{{--You are logged in!--}} | ||
{{--</div>--}} | ||
{{--</div>--}} | ||
{{--</div>--}} | ||
{{--</div>--}} | ||
{{--</div>--}} | ||
|
||
|
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.