Resume Laravel Package

Introduction

This package allows you to build and display a simple interactive multi-lingual HTML CV, as seen here.


Installation

composer require escuccim/resume

Then register the components in /config/app.php:

Add the following to the 'providers' array:

Escuccim\Resume\resumeServiceProvider::class,
Laracasts\Flash\FlashServiceProvider::class,

Run the database migrations to create the blog tables and update the users table:

php artisan migrate

To enable the JavaScript features of the administrative pages you need to add the following to the head of your layouts/app.blade.php view:

<script src="/js/app.js"></script>
@stack('scripts')

Note that you must move the script tag from the bottom of the layout file to the header if you wish to use the WYSIWYG editor or the drag and drop ordering features.

By default I use a middleware I call 'admin' to verify if the user has permission to access the administrative pages. If you wish to use this you need to register the middleware in /app/Http/Kernel.php in $routeMiddleware:

'admin' => \Escuccim\Resume\Middleware\AdminMiddleware::class,

If you wish to use your own middleware or stick with Laravel's Auth middleware you can do so by updating the config (see below).


Usage

This package contains its own routes, models, controllers and views so should work after installation. To access it just go to /cvadmin and /education.

If you wish to edit my views or other files you can publish them to your application:

php artisan vendor:publish

This will publish all of the files. To only publish certain files add --tag=[group], using the groups listed below:

  • config - publishes the config file to /config/cv.php
  • views - publishes the views to /resources/views/vendor/cv
  • lang - publishes the language files to /resources/lang/vendor/cv-lang

To add additional languages, publish the lang files and then create new directories under /resources/lang/vendor/cv-lang corresponding to the language you wish to add. Copy the cv.php file into your new directory and put the translations into the new language into the array.

Note that out of the box the blog will use the languages specified in config/app.php under 'locale'. If you wish to have the blog translate on a per request basis you will need to provide the code for this, or use my package escuccim/translate.

The URI to CV administration is /cvadmin The URI to education administration is /education. You should add your own route to view the actual CV to your /routes/web.php file:

Route::get('[URI]', '\Escuccim\Resume\Http\Controllers\JobsController@cv');

If you wish to update the display publish my views and edit them.

This package will only generate a CV consisting of professional experience, followed by education. To add additional info to it you can create the following file: /resources/views/cv/cv_extras.blade.php. If this file exists it will be included at the bottom of the generated CV.

When generating the CV to display the package will pull the data out of the database corresponding to the locale specified by the app. You will need to add a translation for each job experience and each education experience by specifying the language when adding or editing. So if you are viewing the CV in French only entries marked with 'fr' will appear.


Configuration

You should be specify most of what you need in the config file at /config/translate.php. It contains the following values:

  • langs - array which contains a list of languages as follows: '[lang]' => '[display]' where lang is the code for the language and display is the name to display in the drop-down menu when adding new entries.
  • admin_middleware - the middleware used to determine if the user has permission to access administrative pages. Defaults to my admin middleware, if you want to use Laravel's auth replaced this with 'auth' or you can use your own middleware.