I am doing a simple CRUD, but I want that when I Create a new Employee, Update or Delete it I get a message with Alertify, I know that this odannyc-Alertify that is installed with Composer but it still does not work for me, and when installing Alertify with the composer I get this message.
Package phpoffice/phpexcel is abandoned, you should avoid using it. Use phpoffice/phpspreadsheet instead.
This is the controller part to update and I want that message to be displayed
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
$employee = Employee::find($id);
$employee->fill($request->all());
$employee->save();
alertify()->success('USER WAS UPDATE.')->delay(6000)->position('bottom right');
return $this->show($id);
}
The code that you have I write according to the documentation that is in the Github repository is fine, googling the error it seems that it is a composer package that is deprecated
bug ref on github
That error that the console gives you is because you have a package that has been abandoned phpoffice/phpexcel and you are recommended to use the new package phpoffice/phpspreadsheet .
About odannyc-Alertify to make it work
composer require odannyc/laravel-alertify
in console. (checkcomposer.lock
if the package is found).app.php
located inconfig/app.php
you must add'providers' => [ odannyc\Alertify\AlertifyServiceProvider::class, ];
'aliases' => [ 'Alertify' => odannyc\Alertify\Alertify::class, ];
HTML
(if you need it available in any view), you must include inresources\views\layouts\app.blade.php
the following@include('alertify::alertify')
<script src="https://cdn.rawgit.com/alertifyjs/alertify.js/v1.0.10/dist/js/alertify.js"></script>
I test on a new project.
In the
composer.lock
I find the package like this: