adminLTE stop working after install livewire - laravel-livewire

i have a site created with laravel 9.16.0 PHP 8.1.5, AdminLTE 3.2 and bootstrap, all was working fine.
i've decide to use Livewire for some stuff.
After installed it and modify the Adminlte.php file at config folder
i got an error after the user login in and he's redirected to home.blade.php :
message:
InvalidArgumentException: No hint path defined for [adminlte].
git version shows that only 2 file have been change:
composer.json
composer.lock.
Any idea about this errro?
is there something else that need to bee added /setting

Add in composer.json:
require": {
"jeroennoten/laravel-adminlte": "3.*"
}
Then run the command:
composer update

Related

Laravel showing error from /var/app/ondeck after deployment aws elasticbeanstalk

After having successfully deployed my laravel 5.4 app using AWS Elasticbeanstalk, Laravel throws InvalidArgumentException in FileViewFinder exception saying View [index] not found when i access my root route.
Here is a snippet of the stack trace.
in FileViewFinder.php line 137
at FileViewFinder->findInPaths('index', array('/var/app/ondeck/resources/views')) in FileViewFinder.php line 79
at FileViewFinder->find('index') in Factory.php line 128
at Factory->make('index', array(), array()) in helpers.php line 914
at view('index') in HomeController.php line 24
As you can see, Laravel it trying to find the view from /var/app/ondeck which as far as i know is the temporary location during deployment not after deployment. I've search everywhere and I can't seem to find a similar issue.
Any help on it will be appreciated.
After battling with it, I managed to use a post deployment script /opt/elasticbeanstalk/hooks/appdeploy/post/artisan_clear_cache.sh to run php artisan config:cache. Laravel caches the view path to point to ondeck directory so after deployment the cache needs to be cleared. Unfortunately this method is not documented. So I worked around it this way.
I had to create the directory that will contain the post deploy hook because it didnt exists by default. Running mkdir /opt/elasticbeanstalk/hooks/appdeploy/post will do.
I had to set the permissions for Laravel to write to storage. Running chmod -R 755 /var/app/current/storage will do.
Finally i had to put artisan command within the .sh.
This way the script will automatically run post deployment and clear the cache.
Note that all of this has to be done in a .config file in the .ebextensions directory within your project root. More details on that here

Request to https://bower.herokuapp.com/packages/ember-cli-test-loader failed: self signed certificate in certificate chain

I am new to ember.js.
While trying to get started in ember.js , it asked me install bower.
While doing $bower install i am getting the message.
bower ember-cli-test-loader#0.2.2SELF_SIGNED_CERT_IN_CHAIN Request to https://bower.herokuapp.com/packages/ember-cli-test-loader failed: self signed certificate in certificate chain
Please help me to resolve this.
Create a .bowerrc file in your app's root directory and include the following JSON:
{
"directory": "bower_components/",
"registry":"http://bower.herokuapp.com"
}
This will use the non-ssl version of heroku's bower repository.
Bower is deprecating their registry hosted with Heroku. http://bower.herokuapp.com/ Will not be accessible anymore or it might be down intermittently, therefore, forcing users to a new registry.
Users working on old bower versions can update the .bowerrc file with the following data.
{
"registry": "https://registry.bower.io"
}
.bowerrc file can be located at the same folder where bower.json and bower_components folder is located. If it is not present already, you can make one.
For references check the below links
https://twitter.com/bower/status/918073147789889536
https://gist.github.com/sheerun/c04d856a7a368bad2896ff0c4958cb00

Embli-Cli Not work after Building

Iam working around Ember-Cli.I build a project and customize the "ember-cli-build.js" but finally it doesn't work.
this is my work steps:
1) ember new myapp
cd myapp
ember server
it works fine and i can see my project on "http://localhost:4200"
2) then run ember build --environment=production and get Built project successfully. Stored in "dist/". so it appear that my project built.
3) then i run this url on browser that direct to my dist directory project
localhost/~/myapp/dist/index.html
but nothing shows.
i check the console and it seems that the "ember" is running, but nothing shows on the screen
i found the anwser. first of all on the "enviroment" change these locationType: 'hash'
APP: {
rootElement: "#page-base"
}
and then go to "project/app/index.html" and place <div id="page-base"></div>
then build the project by ember build --environment=production
it works fine.
It is expected that you deploy everything inside /dist folder to your server and it will be the root of your http server. And there is a way to simulate this behavior on your local environment. All you need is to install http-server globally in your system:
npm install http-server -g
then navigate to the dist folder of your app:
cd myapp/dist
and start the http-server:
http-server -o
That's it. You have your built ember application running in your browser locally.

How do I upload a webpage to Bluemix using the cf CLI?

I'm trying to upload an index.html page to Bluemix using the cf CLI. I'm not sure if I'm approaching this with the right mentality. I'm thinking of uploading this HTML file as we usually do with normal hosting services, through FTP. With Bluemix I assume I should be using the push command in cf and treat this index.html as an app. Is this right?
If this is right, I'm not getting how to use this command. Can you give me an example of full command to push/upload this page?
The cf push command would be the one to use to 'upload' your application to the Bluemix server. However, it does more than just upload. In Bluemix there is a concept of a runtime or buildpack, the idea being this will be the runtime to run your application. So if you uploaded a Java application you would pair it with the Java Liberty Buildpack/runtime. If you uploaded a PHP application then you would pair it with the PHP buildpack.
If you pushed just a HTML file with no buildpack then you would likely get an error indicating the buildpack could not be determined. Bluemix tries to guess the type of buildpack you want based on the type of files uploaded, and then pull the buildpack from an internal cache. The cf push command allows you to explicitly state the buildpack to use -b so there is no guess work and no need to rely on only the buildpack that Bluemix currently knows about.
In your case, for a static HTML file you would need some type of http server like nginx as the 'runtime'. Notice that Bluemix currently does not have a built-in buildpack for this, so you'd have to get it from somewhere else. There are a few buildpacks available already, but the best one to use would be this one: https://github.com/cloudfoundry-community/staticfile-buildpack . To use it simply supply that url with the -b option on the cf push command from the root directory of your application i.e.
cf push yourappname -b https://github.com/cloudfoundry-community/staticfile-buildpack
Be sure you are issuing this command from your app directory.
The yourappname will be part of the URL for your website/app
For an actual example, we will upload your index.html which exist in folder C:\Users\XYZ\Documents\projects\ProjectHelloWorld and we will call this app HelloWorld. Here is what we would do:
C:\> cd C:\Users\XYZ\Documents\projects\ProjectHelloWorld
C:\Users\XYZ\Documents\projects\ProjectHelloWorld> cf push HelloWorld -b https://git
hub.com/cloudfoundry-community/staticfile-buildpack
Bluemix will then upload everything in that local directory to the server and also grab the buildpack from the URL location and stage your application code with the buildpack, Bluemix will then attempt to start the application. This is an example Bluemix output when the push command succeed:
Creating app HelloWorld in org xyz#gmail.com / space test as xyz#gmail.com...
OK
Creating route HelloWorld.mybluemix.net...
OK
Binding HelloWorld.mybluemix.net to HelloWorld...
OK
Uploading HelloWorld...
Uploading app files from: C:\Users\XYZ\Documents\projects\ProjectHelloWorld
Uploading 1M, 21 files
Done uploading
OK
Starting app HelloWorld in org xyz#gmail.com / space test as xyz#gmail.com...
-----> Downloaded app package (960K)
Cloning into '/tmp/buildpacks/staticfile-buildpack'...
grep: Staticfile: No such file or directory
-----> Using root folder
-----> Copying project files into public/
-----> Setting up nginx
grep: Staticfile: No such file or directory
-----> Uploading droplet (3.4M)
1 of 1 instances running
App started
OK
Showing health and status for app HelloWorld in org xyz#gmail.com / space
test as xyz#gmail.com...
OK
requested state: started
instances: 1/1
usage: 1G x 1 instances
urls: HelloWorld.mybluemix.net
last uploaded: Tue Nov 25 14:50:44 +0000 2014
For more details:
See the github page for the buildpack on how to structure your application (public folder etc)
See Bluemix Docs website. It has a lot of demos and examples.
See Takehiko Amano's Bluemix demo. Is a good and easy to understand demo.
you can either deploy your app directly using "cf push ..." or via creating a manifest.yml file.if you create manifest.yml file inside you app code path,only cf push is sufficient.
below is the reference link for this:
http://clouds-with-carl.blogspot.in/2014/02/deploy-minimal-nodejs-application-to.html
Hope it clears your doubt!!
Yeah as whitfiea mentioned its pretty simple. You need to use the cf push command. For example if you had a static website with an index.html file.
For example the following.
[02:30 PM] jsloyer#jeffs-mbp [friendme]>ls
index.html
To push that app to Bluemix run the following.
cf push yourappname -b https://github.com/cloudfoundry-community/staticfile-buildpack.git
https://www.ng.bluemix.net/docs/#starters/index.html
In this browse Creating Web Apps->Building a web app-> Uploading an app
It says;-
You can use a sample Java™ web application to get started. This sample application displays the list of environment variables that are available. You can download the sample Java web application from the community sample site. The sample application contains a single JSP and the WEB-INF/web.xml file.
Extract the downloaded file, and a new directory that contains the application is created. From the newly created application directory, issue the cf push command. In the following example, you can use a unique name testEnv for the application and 512M for memory allocation. The name must be unique in the whole Bluemix environment.
$ cf push testEnv -m 512m
->So as per your requirement, you can add your html file along with the JSP file before uploading the application.
Hopefully this help...

installing phpunit on zend server

Hi All I have gone through many related question to this problem but I am still unable to get the solution. I have installed Zend Server. Now I want to install PHPunit. I have installed pear and then installed PHPUnit.
My Zend Server is installed at
C:\xyz\zend\ZendServer
My pear is installed at
C:\xyz\zend\ZendServer\bin\PEAR
And PHPunit is installed at
C:\xyz\zend\ZendServer\bin\PEAR\pear\PHPUnit
I have added pear path and even PHPUnit path to Envrionmental PATH variable. Then I opened php.ini located at
C:\xyz\zend\ZendServer\etc
and set include_path as
include_path = ".;c:\php\includes;c:\xyz\zend\ZendServer\bin\PEAR\pear;c:\xyz\zend\ZendServer\bin\PEAR\pear\PHPUnit"
Now When I run command at cmd to create zend project, the project is created but I found this note too
Testing Note: PHPUnit was not found in your include_path, therefore no testing action will be created.
Some one please tell me what Am I doing wrong and where to set this include path???
Best Regards :-)
Let's do some old school debugging :)
$ zf create project ./one
Creating project at /path/to/one
Note: This command created a web project, for more information setting up your VHOST, please see docs/README
Testing Note: PHPUnit was not found in your include_path, therefore no testing actions will be created.
No PHPUnit!
Locate path/zend-framework/bin/zf.php and add near the top:
var_dump(get_include_path());
Now let's see what the include path looks like:
$ zf create project ./two
string(32) ".:/usr/share/php"
Creating project at /path/to/two
Note: This command created a web project, for more information setting up your VHOST, please see docs/README
Testing Note: PHPUnit was not found in your include_path, therefore no testing actions will be created
My PHPUnit isn't in the /usr/share/php directory. Let's resolve that by adding PHPUnit to the include path.
e.g. If PHPUnit is in /path/to/phpunit, open the php.ini file and add it to the include path.
Third times a charm:
$ zf create project ./three
string(56) ".:/usr/share/php:/path/to/phpunit"
Creating project at /path/to/three
Note: This command created a web project, for more information setting up your VHOST, please see docs/README
If you've edited the correct php.ini, the var_dump() you added to zf.php will now echo the include path with whatever you modified it to, which in my case it was correct, so now PHPUnit is working.
Now remove the debug code from zf.php