Here for example we are storing a new invoice, we pass the validated request along with a factory into the invoice repository where it is processed and saved. $invoice = $ this-> invoice_repo-> save( $request-> all(), InvoiceFactory:: create(auth()-> user()-> company()-> id, auth()-> user()-> id)) Įvent( new InvoiceWasCreated( $invoice, $invoice-> company, Ninja:: eventVars(auth()-> user() ? auth()-> user()-> id : null))) Public function store( StoreInvoiceRequest $request) If successful, the request is then passed into the controller method where it is digested, here is an example: The request then passes into a Form Request (Type hinted in the controller methods) which is used to provide authorization and also validation of the request.Middleware processes the request initially inspecting the domain being requested + provides the authentication layer.The average API request follows this path into the application. The controller methods then describe all the entry points into each domain of the application, ie InvoiceController / QuoteController When inspecting functionality of the API, the best place to start would be in the routes/api.php file which describes all of the availabe API endpoints. The API and client portal have been developed using Laravel if you wish to contribute to this project familiarity with Laravel is essential. Navigate to (replace localhost with the appropriate domain) - To setup your configuration if you did not load sample data. env php artisan migrate:fresh -seed & php artisan db:seed & php artisan ninja:create-test-data Run if you want to load sample data, remember to configure. env file is used to encrypt data, if you lose this you will not be able to run the application. Quick Hosting Setup git clone -single-branch -branch v5-stable We offer a $30 per year white-label license to remove the Invoice Ninja branding from client facing parts of the app. To produce a invoicing application like no other.Īll Pro and Enterprise features from the hosted app are included in the open code. We took the best parts of version 4 and add the most requested features Join us on Slack, Discord, Support Forum Introduction
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |