kingga / laravel-workflow-timesheet
The laravel interface for kingga/workflow, this includes models which will store this information in the database and then add it back into the structures.
1.0.0
2019-07-28 03:05 UTC
Requires
This package is auto-updated.
Last update: 2025-04-29 01:20:00 UTC
README
This is a package for Laravel which extends the base library kingga/workflow-timesheet
. This package can be used to store the parsed file into the database and then converted back into an object from the database.
Installation
- Run the command
composer require kingga/laravel-workflow-timesheet
- Add the
Kingga\LaravelWorkflowTimesheet\WorkflowTimesheetServiceProvider
service provider to theconfig/app.php
file. - Run the command
php artisan migrate
Usage
Storing
use Kingga\WorkflowTimesheet\Parser; use Kingga\LaravelWorkflowTimesheet\WorkflowWeek; $parser = new Parser; $week = $parser->parse(storage_path('timesheets/Time-Sheet.csv')); // NOTE: The user must be logged in as this is assigned per user. WorkflowWeek::create($week);
Retrieving
use Kingga\LaravelWorkflowTimesheet\WorkflowWeek; dd(WorkflowWeek::first()->toObject());