Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laravel 7.x #2429

Merged
merged 3 commits into from
Mar 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions app/View/Components/Alert.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php

namespace App\View\Components;

use Roots\Acorn\View\Component;

class Alert extends Component
{
/**
* The alert type.
*
* @var string
*/
public $type;

/**
* The alert message.
*
* @var string
*/
public $message;

/**
* Create the component instance.
*
* @param string $type
* @param string $message
* @return void
*/
public function __construct($type, $message)
{
$this->type = $type;
$this->message = $message;
}

/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\View\View|string
*/
public function render()
{
return $this->view('components.alert');
}
}
2 changes: 1 addition & 1 deletion app/Composers/App.php → app/View/Composers/App.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Composers;
namespace App\View\Composers;

use Roots\Acorn\View\Composer;

Expand Down
2 changes: 1 addition & 1 deletion app/Composers/Post.php → app/View/Composers/Post.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Composers;
namespace App\View\Composers;

use Roots\Acorn\View\Composer;

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
}
},
"require": {
"php": "^7.2",
"roots/acorn": "dev-master"
"php": "^7.2.5",
"roots/acorn": "^1.0.1"
},
"require-dev": {
"filp/whoops": "^2.7",
Expand Down
Loading