Have you just added the line to composer.json or did you also install it with composer require maatwebsite/excel "~1.3"?
Aug 19, 2019
6
Level 3
Adding any thing in app.php's providers crashes the application
I have been trying to export data to excel so for this purpose I added
'Maatwebsite\Excel\ExcelServiceProvider' in providers
'aliases'=>array(
'Excel' => 'Maatwebsite\Excel\Facades\Excel'
)
I have also added "maatwebsite/excel": "~1.3" in composer.json, because my laravel version "laravel/framework": "4.0.*", so
"require": {
"laravel/framework": "4.0.*",
"way/generators": "2.6.*",
"cartalyst/sentry": "2.0.*",
"willdurand/geocoder": "2.4.*",
"toin0u/geocoder-laravel": "0.4.1",
"kriswallsmith/buzz": "@stable",
"egeloen/google-map": "1.3.*@dev",
"intervention/image": "1.*",
"intervention/imagecache": "1.*",
"greggilbert/recaptcha": "1.1.5",
"patchwork/utf8": "~1.1",
"maatwebsite/excel": "~1.3"
},```
is my composer.json require section.
and when I add it in app.php providers and aliases, my application crashes. I am using homestead.
NOTE: I can't add anything in providers.
Level 28
Level 3
Thank you, composer require maatwebsite/excel "~1.3" worked.
I also have other issue of php artisan commands not working.
vagrant@homestead:~/hallsforhire$ composer require maatwebsite/excel "~1.3"
1/3: http://repo.packagist.org/p/provider-lateste45e94fad17da0483c4253910219bd1eec3442064cc3525d2a24a5797f42bc2.json
2/3: http://repo.packagist.org/p/provider-2019-07$ba14a64bbda0d6be52cdef483992230c233975d43a387abafb1e416b61ec7016.json
3/3: http://repo.packagist.org/p/provider-2019-04e14a0d40d60142520d86ccac7531052c958660397c5ad607aeb194a240ad4b6.json
Finished: success: 3, skipped: 0, failure: 0, total: 3
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
1/4: https://codeload.github.com/doctrine/lexer/legacy.zip/1febd6c3ef84253d7c815bed85fc622ad207a9f8
2/4: https://codeload.github.com/tijsverkoyen/CssToInlineStyles/legacy.zip/9753fc340726e327e4d48b7c0604f85475ae0bc3
3/4: https://codeload.github.com/Maatwebsite/Laravel-Excel/legacy.zip/38a922afe0714dcddde926ba23dfd0f5678cb18a
4/4: https://codeload.github.com/PHPOffice/PHPExcel/legacy.zip/39534e3dd376041d0d50a4714e73375bf45b692b
Finished: success: 4, skipped: 0, failure: 0, total: 4
Package operations: 4 installs, 0 updates, 0 removals
- Installing tijsverkoyen/css-to-inline-styles (1.5.5): Loading from cache
- Installing doctrine/lexer (1.0.x-dev 1febd6c): Cloning 1febd6c3ef from cache
- Installing phpoffice/phpexcel (1.8.x-dev 39534e3): Cloning 39534e3dd3 from cache
Cloning 39534e3dd3 from cache
- Installing maatwebsite/excel (1.3.10): Loading from cache
Package phpoffice/phpexcel is abandoned, you should avoid using it. Use phpoffice/phpspreadsheet instead.
Writing lock file
Generating autoload files
> php artisan clear-compiled
> php artisan optimize
Laravel requires the Mcrypt PHP extension.
Laravel requires the Mcrypt PHP extension.
Level 28
You need to install the php mcrypt extension for older versions of Laravel. The newer versions of homestead probably don't have it installed anymore since it's not needed for newer Laravel versions.
https://laracasts.com/discuss/channels/general-discussion/mcrypt-php-extension-required?page=1
Level 3
2. when I run any php artisan commands I get the below output I don't know why:
</html>vagrant@homestead:~/halls$ php artisan list
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js ie lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js ie" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Halls for Hire</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="http://localhost/favicon.ico">
<link rel="apple-touch-icon" href="http://localhost/apple-touch-icon.png">
<link rel="stylesheet" href="http://localhost/styles/app.css">
<script src="http://localhost/scripts/vendor/modernizr.min.js"></script>
<script>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-32397342-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body class="">
<!--[if lt IE 7]>
<div class="alert-box error browsehappy" data-alert>You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience. <a href="#" class="close">×</a></div>
<![endif]-->
<header id="header">
<h1 id="title"><a href="http://localhost" class="sprite logo-header">Halls For Hire</a></h1>
<div id="user" class="show-for-medium-up">
<a href="http://localhost/login" class="login"><i class="fa fa-lock "></i> Log In</a>
<a href="http://localhost/register" class="button secondary radius"><i class="fa fa-bullhorn "></i> List Your Hall</a>
</div> </header>
<section id="main">
<div class="wrap center">
<h3>Error occurred!</h3>
<p>An unknown error has occurred.</p>
<p><a href="http://localhost">Return Home</a></p>
</div>
</section>
<footer id="footer">
<div class="wrap">
<div class="row">
<div class="medium-3 columns">
<h6><i><strong>©</strong></i> Halls for Hire</h6>
<nav>
<a href="http://localhost/conditions"><i class="fa fa-list-alt "></i> Terms & Conditions</a>
<a href="http://localhost/contact"><i class="fa fa-envelope-o "></i> Contact Halls for Hire</a>
</nav>
</div>
<div class="medium-3 columns">
<h6><i class="fa fa-list "></i> Navigation</h6>
<nav>
<a href="/"><i class="fa fa-search "></i> Search Halls</a>
<a href="http://localhost/halls"><i class="fa fa-list-alt "></i> Browse Halls</a>
<a href="http://localhost/about"><i class="fa fa-question-circle "></i> About</a>
<a href="http://localhost/pricing"><i class="fa fa-money "></i> Pricing</a>
<!-- <a href="http://localhost/community"><i class="fa fa-users "></i> Community</a> -->
</nav>
</div>
<div class="medium-3 columns">
<h6><i class="fa fa-user "></i> Members</h6>
<nav>
<a href="http://localhost/login" class="login"><i class="fa fa-lock "></i> Log In</a>
<a href="http://localhost/register"><i class="fa fa-bullhorn "></i> List Your Hall</a>
</nav>
</div>
<div class="medium-3 columns">
<h6><i class="fa fa-thumbs-up "></i> Get Social</h6>
<nav>
<a href="https://www.facebook.com/" target="_blank"><i class="fa fa-facebook "></i> Facebook</a>
<a href="https://twitter.com/" target="_blank"><i class="fa fa-twitter "></i> Twitter</a>
</nav>
</div>
</div>
</div>
</footer>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<!--<script src="http://localhost/scripts/vendor/jquery.min.js"></script>-->
<script>window.jQuery || document.write('<script src="http://localhost/scripts/vendor/jquery.min.js"><\/script>')</script>
<script src="http://localhost/bower_components/foundation/js/foundation.min.js"></script>
<script src="http://localhost/bower_components/foundation/js/foundation/foundation.clearing.js"></script>
<script src="http://localhost/scripts/app.min.js"></script>
</body>
</html>
vagrant@homestead:~/halls$
I don't why it is giving this index.html page.
Level 3
The html mentioned above is public/index.php
Level 3
commenting //'Way\Generators\GeneratorsServiceProvider',in config/app.php fixed the issue.
Please or to participate in this conversation.