Get an image stored in a Codeigniter project - codeigniter

Basically I have 2 frontend projects and one of these uses some assets that are stored in the other one.
In my java frontend (let's name it this way) I have to use www.codeigniterFront.com/img/example.png to get an image stored in my Codeigniter frontend, the problem is that it throws 404 error because that's not a valid route in my codeigniter router. So is there a way to ignore the router for all the /img/* routes or somethin I can do?

Related

Generate route url from subdomain to the main domain

I have a multi-tenant app. So let's say I have test.app.com and app.com. I can successfully navigate from app.com to test.app.com but I am unable to the opposite.
I tried wrapping the routes of my app.com inside a Route::domain() but that only gives me a 404 error instead of actually redirecting it to the url
EDIT: Just to make sure, I want to redirect using a relative path (with the route() method).

Redirect laravel to angular route

I need to make laravel redirect to an Angular route.
I'm deploying my first project using Angular7 for front & laravel 5.8 for the API and it works fine in development. However when I build the Angular project and locate it in the public directory of laravel so that I can access it by http://127.0.0.1:8000/<my project name> angular route doesn't work if I request a specific link like http://127.0.0.1:8000/<my project name>/view/data/45. In this case laravel returns 404 response since this is Angular's route not laravel.
fixed it by adding a new route to Laravel routes which redirect whatever it got to the index page of Angular and added the <router-outlet></router-outlet> to my index.html page

Laravel + Angular 4

I want to create some project and use there Laravel as API and Angular 4 to represent my site.
Since I have no money for experiments, I found hostinger.co.uk where I can set up php framework and do that I need.
I started configuring Laravel and get confused - where to place my site on angular? I'll have the only one site address. So I'd like to make it combined, because I need Laravel the only for working with DB.
Best practice would be to keep api & frontend seperate.
If you insist on using single domain, such as example.com you can use subdomain api.example.com for API, and main domain for presenting your site.
On a shared hosting you can place folders something like these:
/api -- laravel installation(with subdomain api.example.com)
<angular build files>
index.php
script.bundle.js
style.bundle.js
etc.
......
.....
.....
.....
For development you can keep your angular files anywhere on your local system, and upload only build distribution to the main domain.

uploading files from one domain to another in laravel 5

I am kinda stuck in my laravel 5.2 application (I'm actually a newbie in Laravel). I am working on a project with both front and back ends. The two ends are hosted on two different domains (frontend on the main domain and backend on a subdomain). The problem is, am trying to upload files (images) from the backend on the subdomain to a folder on the main domain. I have made extensive research on how to do this to no avail. Hoping to get assisted. Thanks.
Try to make the upload form on the same server that the request is procesed and try to include the form on the other server using an iframe or something similar.

How to separating frontend and backend using codeigniter

I am a new php developer. Am developing my website using codeigniter and got stuck when i tried to make the backend. Am using CMS backend that comes with its own folder with everything (.htaccess, its own MVC etc) so I put all my frontend folders into one folder called frontend withinn the application folder but now I cannt view my frontend pages. I get this: The configuration file does not exist. Please help me step by step.
check out this link to know the MVC pattern Codeigniter.
controller and model ----- Backend
Views --- Frontend

Resources