LostKobrakai

Laravel Valet with ProcessWire

23 posts in this topic

Just to add that here. The driver can be installed manually until and if the pr does get merged into valet. Just put the ProcessWireValetDriver.php of the pr into the ~/.valet/Drivers folder and start your ProcessWire project. 

2 people like this

Share this post


Link to post
Share on other sites

thank you @pwired

do you have processwire running on laragon? what are the steps necessary to do?

thank you :)

1 person likes this

Share this post


Link to post
Share on other sites

@Rudy I did take a look at your take at it and the subfolder option didn't seem to work. 

I've now enhanced it to be configurable to different optional subfolders to look for a ProcessWire installation. I've also taken the trailingSlash part out, because ProcessWire does not enforce trailing slashes, but it can do it on it's own if you want it to.

https://gist.github.com/LostKobrakai/5328d6f64e9dc06a8776d0231c6628c6

2 people like this

Share this post


Link to post
Share on other sites

to make file uploads work i had to make those adjustments on my laragon + win10:

// php.ini (right click on laragon tray > php > php.ini
date.timezone = Europe/Vienna // uncomment and set
always_populate_raw_post_data = -1 // uncomment

don't forget to reload laragon :)

awesome tool so far, thanks for sharing @LostKobrakai and @pwired

 

1 person likes this

Share this post


Link to post
Share on other sites

@LostKobrakai, when you have a chance, could you test this on your Valet/PW install. 

do a 

var_dump(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH));

and visit a page that has dash in the segment name.

on my PW install:

Original URL: http://my.dev/this-and-that/

The var_dump output is "-that"

I ran the same test on my MAMP Pro and Ubuntu server and both comes out as "this-and-that"

Not sure if it's isolated to my Valet or not.

Thanks

Rudy

Share this post


Link to post
Share on other sites

Never heard of valet, looks great. Have to try it out later. How can PW run in valet, when there's no apache?

Share this post


Link to post
Share on other sites

Valet runs on Caddy HTTP server. It's pretty fast. By default, it installs Caddy and PHP 7. You will need to install MariaDb or MySQL and use PW Driver to run PW on it. 

 

Share this post


Link to post
Share on other sites

Hi,

I am using Laragon (laravel for mac) on Windows but can not solve the mod_rewrite error when installing Processwire 2.7

 

mod_rewrite.jpg

 

I searched with Google but could only find some tips about php.ini and nginx.conf but didnt make the mod_rewrite error go away.

I tried to look inside the list with php extensions to see if it has to be enabled there like with wamp but it seems not to be there in the list.

What needs to be done here ?

 

mod_rewrite2.jpg

 

 

 

Share this post


Link to post
Share on other sites

mod_rewrite is a part of apache, so there's nothing to detect when this is using nginx. But you can still complete the installation with that error. Just make sure rewrites are correctly set up in nginx as well.

1 person likes this

Share this post


Link to post
Share on other sites

Thanks for your reply LostKobraKai. Ok I clicked on Continue and could finish the installation. So I only have to setup rewrites when I need them. I will be good then for the time being. How to create nginx rewrite rules must be easy to find with Google. I assume I have to put them in nginx.conf

 

conf.jpg

 

 

 

Share this post


Link to post
Share on other sites

There is a nginx.conf somewhere here in the forums. Just search for it on google. 

1 person likes this

Share this post


Link to post
Share on other sites

Just wanted to say thanks for creating the Valet driver - it works well with the latest master and dev branches of PW. It is noticeably faster than MAMP, not to mention much easier to setup - just create a new folder and off you go. Also the ease of setting up SSL for local testing is very unique. I've not used it extensively but this feels like the best local development setup I have tried so far (for performance and ease of setup). Interested to hear if anyone has had any issues using Valet for PW development.

I am also very impressed by homebrew - it has come a long way since my earlier tests and seems to be very solid since turning 1.0 with lots of additional help to make sure you don't mess anything up.

1 person likes this

Share this post


Link to post
Share on other sites
On 10/15/2016 at 8:29 AM, LostKobrakai said:

@Rudy I did take a look at your take at it and the subfolder option didn't seem to work. 

I've now enhanced it to be configurable to different optional subfolders to look for a ProcessWire installation. I've also taken the trailingSlash part out, because ProcessWire does not enforce trailing slashes, but it can do it on it's own if you want it to.

https://gist.github.com/LostKobrakai/5328d6f64e9dc06a8776d0231c6628c6

I confirm that this version is working on Windows 10, using https://github.com/cretueusebiu/valet-windows

If yours doesn't work, maybe enabling developer mode on Windows is required.

Thanks @LostKobrakai !

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.