How could I use one route with git for multiple developers in Laravel 4.2

I have only one routes <strong>app/routes.php</strong>, I am using <strong>git /git-hub</strong> for sharing my projects with some developers. Cause they can work together. But problem is that : every one using same <strong>routes.php</strong> file for routing and when they <strong>push/pull</strong> in git this <strong>routes.php</strong> file conflicts all the time.

Is there any way to set routes for different developer in same project ?


There is a silly way but fruitful::

<ol> <li>create routes_demo.php :: here demo developer can work </li> <li>Include routes_demo.php in your main routes.php</li> </ol>

include more as your need. Enjoy sharing codes /projects.



This is what Github is all about - collaboration between multiple developers.

There are many ways to handle this - but in general each developer can fork his own branch - make changes - then merge them back in.

You will expect conflicts on the file - but the conflicts should not be the same route - it should be different routes in the same file - so you can merge the conflict into the one route file


I suggest you use controllers to define routing logic, so your routes.php file does not get complicated. You will avoid a lot of conflicts this way. You can read more here. Pasting an excerpt:

Instead of defining all of your route-level logic in a single routes.php file, you may wish to organize this behavior using Controller classes. Controllers can group related route logic into a class, as well as take advantage of more advanced framework features such as automatic dependency injection.


  • Conditionally enable/disable fields in AEM 6.1 (granite.ui) TouchUI dialogs
  • passing the latitude and longitude to my map script
  • Calculate letter size in javascript
  • Add Jpanel to Jframe NetBeans
  • How to convert Neo4j Result to GraphJSON
  • Recursion in ASP.NET Core Razor views
  • Update SQL MS Access 2010
  • Best practice for switching iPhone views?
  • CoreData basics – to-many relationship array data
  • Highcharts - Column chart with empty columns for date in x-axis
  • Configuring multiple DefaultJmslistenercontainerfactory
  • How gzip file gets stored in HDFS
  • What is the default HTTP verb in WebApi ? GET or POST?
  • SQL - Select lowest values with group by and order by?
  • Angular Bootstrap Carousel Slide Transition not working correctly
  • Does Apportable support to build library binary (.a/.so)?
  • Jenkins: FATAL: Could not initialize class hudson.util.ProcessTree$UnixReflection
  • How can I speed up CURL tasks?
  • Limiting recursion to certain level - Duplicate rows
  • Switching to Release Build causes runtime error in Web Reference
  • Meteor helpers not available in Angular template
  • Extracting HTML between tags
  • Asynchronous UI Testing in Xcode With Swift
  • If I include Java 8 in my Android app does that affect which devices it will work on?
  • Repeat a vertical line on every page in Report Builder / SSRS
  • Why is an OPTIONS request sent to the server?
  • Android screen density dpi vs ppi
  • Bug in WPF DataGrid
  • Why is the timeout on a windows udp receive socket always 500ms longer than set by SO_RCVTIMEO?
  • QuartzCore.framework for Mono Develop
  • Comma separated Values
  • Buffer size for converting unsigned long to string
  • Error creating VM instance in Google Compute Engine
  • Hits per day in Google Big Query
  • how does django model after text[] in postgresql [duplicate]
  • How to get Windows thread pool to call class member function?
  • unknown Exception android
  • XCode 8, some methods disappeared ? ex: layoutAttributesClass() -> AnyClass
  • Checking variable from a different class in C#
  • java string with new operator and a literal