Welcome to Rants and Raves!
I kept hearing that I needed to write, so here is the blog that I ended up starting.
It is mostly an accounting of my progression through creating a web site, nuances with code, and tips about what I did to make things work.
In there you will find sprinkled about some gems of life, and letting loose fun.
Enjoy!
Thoughts
2023-03-15
I've been thinking a lot, perhaps too much. This world is complicated, perhaps overly so. Yet we exist, or at least it seems I exist, whether or not I like it. While it seems like there might ultimately be a way out, I have a feeling that it would only be temporary. There are a lot of theories as to what is going on, why we are here, what happens later, and a set of rules that follows every one. I get the feeling that the answer is "yes to all all of them". That seems like an impossibility, but yet somehow it seems like the only answer. As technology advances and knowledge increases it seems like everything is converging. It also seems like when everything crashes together it will meld together, compress, and explode yet again. Flipping the roles, miss matching components, reversing what had been done. I believe someone once said something along the lines of "If you have an infinite number of monkeys on an infinite number of typewriters with an infinite amount of time, one will produce Shakespeare". With that in mind it would be easy to surmise the same thing for everything. That because the thing can exist it does exist. The form it exists in might not be what you would expect or hope for, but that makes sense too. Each of the things has it's own many rules and components and those often conflict with each other if they were in the same form. That is why we are where we are at at any given point, because that is what makes the most sense with everything that we understand. We can change things but it does come with consequences, growing pains as it were, as many things that are actively present will oppose the change. Theoretically, if done meticulously enough the changes will be rather unnoticeable. The benefit to being so meticulous is that you have the chance to see if the consequences of the change will be worth the benefit. However that also has consequences, as you have to live with the current pains, and without the next enjoyment. Not to mention that the stress and strain of being so meticulous might end up costing you the thing you were trying to hang on to anyway. Going too slow will cause problems. Going too fast will also cause problems. As much as I hate to admit it, the right speed isn't consistent either, it varies. How much it varies and what it varies around depends on the things present in your life. You need to identify the things that are present in your life and how much they are present, that will give you a starting point. If you like something make it more present, if you don't like something make it less present. Do keep in mind that each thing has many different influences and adjusting one will likely affect many different aspects in life both positively and negatively. I think that it is important to try and identify what you value and bring things that line up with that into your life, so long as you can be okay with the undesired effects of them. I think it is also important to keep in mind the effects of those things on those close by, that are affected by those as well. Be careful though, if the consideration gets too expansive it is easy to get lost in despair from all of the suffering around. It is a difficult balancing act, more like a dance. The biggest and strongest things can't be stationary, even in death there is movement. As long as there is existence there will be movement. Keep moving, move like you want to, experience life, somehow things will work out.
Not too much today. The truck didn't want to start this morning, and breakdown sent a guy to give us a jump. Listened to some music and played on the practice drum pad. Played some FFXI then listened to some more book.
DataTables To Laravel DataTables And Back Again
2023-03-12
With the framework updated I went to go see about getting the Yajra Box Laravel DataTables active. In order to do that I did end up amending the command:
composer require yajra/laravel-datatables-oracle:^10.*
To:
composer require yajra/laravel-datatables:^10.*
To get a DataTables template in the code I also used:
php artisan datatables:make Users
In order to get the buttons seen and working I needed to also run:
php artisan vendor:publish --tag=datatables-buttons
composer require maatwebsite/excel
I did have to modify the DataTablesUsers controller and add to the html builder this:
->parameters([
'dom' => 'Bfrtip',
]);
as well as the scripts section in the view.
https://yajrabox.com/docs/laravel-datatables/10.0/buttons-starter
Unfortunately it does not seem to provide quite the HTML formatting in Laravel that I am used to. I also identified that straight DataTables does have an export feature that can be implemented and allows for HTML formatting as wanted. So now I think I am going to look at just using DataTables, with the server side processing. Perhaps a little bit more needing to work on understanding how it works, but at this point the Yajra Box version doesn't seem much better.
New To Me Book
2023-03-11
We started a new book called American Gods. Not very far in yet but it certainly has captured my attention. The weather also went from decently warm to unpleasantly cold. Spring is a bit finicky.
Car Is Playing Nice Again
2023-03-10
We were able to swing by the yard for a little bit after the delays and get some things sorted. We were able to test drive our repaired car, and it was playing very nice. Although it does need a little bit more taken care of. It seems we have just managed to get it about to where it was when we got it, although technically in a better state. We also got some waffles from Waffle House, they were yummy.
Unexpected Delay Surprises
2023-03-09
Due to a rescheduling error we ended up being a day early to a delivery. Luckily they were a pretty quite place, and we actually got a nice night's sleep. They also had a Starbucks and Chipotle nearby, so we were able to treat ourselves a little bit. Another nice thing was the amount of dumpsters in back so we didn't have to go searching for a place to throw our trash.
Upgrade Existing Site Via Fresh Laravel Install
2023-03-08
I did take the time to update Laravel by starting a new app. It's a bit long of a post, but everything goes pretty quick for the base setup. It's the copying of the MVC components that's a bit tedious. Here's the rundown:
Assumes Composer installed. (https://getcomposer.org/doc/00-intro.md#installation-windows)
Assumes Homestead installed/setup. (https://laravel.com/docs/10.x/homestead#first-steps)
Assumes GIT installed. (https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
Assumes Bitbucket setup. (https://bitbucket.org)
Assumes Visual Studio Code is installed. (https://code.visualstudio.com/)
Assumes Laravel Forge setup. (https://forge.laravel.com)
CMD/PS
composer create-project laravel/laravel <project> (https://laravel.com/docs/10.x/installation)
cd <project>
Note: This is a good point to install the packages you need, but they can be done whenever.
composer require laravel/breeze (https://laravel.com/docs/10.x/starter-kits#laravel-breeze-installation)
composer require laravel/socialite (https://laravel.com/docs/10.x/socialite)
Note: You will need to add the new test site URL to Google (https://console.cloud.google.com/)
Note: You will also need to change the Google callback in the .env file (GOOGLE_REDIRECT=<redirect URL>)
Note: If you are running multiple test sites in Laravel Homestead be sure the site URL is in the .env file (APP_URL=<site URL>)
Note: You may need to run vagrant provision if the .env file is changed after Homestead setup the app
composer require doctrine/dbal:* (https://laravel.com/docs/10.x/migrations#renaming-columns-on-legacy-databases)
Note: The reason to look at upgrading at this point right here.
composer require yajra/laravel-datatables-oracle:^10.* (https://yajrabox.com/docs/laravel-datatables/10.0/installation)
Note: To get this to install I did have to change ^10.0 to ^10.*
php artisan vendor:publish --tag=datatables
git init (https://getcomposer.org/doc/03-cli.md#init)
Windows Explorer
Open: <homestead dir>/Homestead.yaml
Add to folders section:
- map: <dir>/<project>
to: /home/vagrant/<project>
Add to sites section:
- map: <url>
to: /home/vagrant/<project>/public
Open: C:\Windows\System32\drivers\etc\hosts
Add: 192.168.56.56 <url>
Note: If using Socialite special characters may not be allowed, Google did not allow underscore.
CMD/PS
cd <homested dir>
vagrant up
vagrant provision (https://stackoverflow.com/questions/25777389/homestead-folder-mapping-to-the-wrong-document-root)
Web Browser
Check <url>
Bitbucket
Repositories -> Create repository
Create/select project
Give repository a name
Adjust other settings
Select "Create repository"
Repository -> <repository> (https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/How-to-git-push-an-existing-project-to-Bitbucket)
Select "Clone"
Copy the web link only "https://<user>@bitbucket.org/<path>.git"
CMD/PS
cd <project dir>
git remote add <source name> https://<user>@bitbucket.org/<path>.git (Note that if you get "error: remote <source name> already exists." you should be able to clear it with "git remote remove <source name>".)
git push -u -f <source name> <branch> (git help push)
VS Code
Open project: File -> Open Folder -> <project dir> -> "Select folder"
Explorer: Make change in some code
Source Control: Stage changes, add message, commit
Source Control Repositories: three dots, push
Bitbucket
Verify changes
VS Code
Lower left corner -> select branch name, Create new branch..., give name
Source Control: Publish Branch
Bitbucket
Verify changes
Laravel Forge
Select server -> Site -> App -> Update Git Remote
Copy SSH key
Bitbucket
<Repository> -> Repository settings -> Access Keys -> Add key
Label -> <name>
Key -> Paste from Forge
Add SSH key
Wait...? I do think that to move to a new repository you do need to uninstall the repository in Forge first.
Laravel Forge
Select server -> Site -> App -> Uninstall Repository
Yes
Select Git Repository
Name repository to the end portion of the clone link <something>/<something else>.git
Select test branch
Install Repository
At this point everything should be good to start copying/comparing the previous model/view/controller/migrations/etc. to get them worked into the new project. Good luck!
HAPPY BIRTHDAY NOVA!!!!!!
2023-03-07
It's my puppy's birthday! She an old lady now! A whopping 11 years old!
Moving Again, At Least A Bit
2023-03-06
We did end up getting a trailer, just to find out it had a flat tire. Got breakdown to get someone to come fix it, but had a good wait. After they swapped the tire for the spare we drove about 2 hours to finally pick up a load... just for them to be closed. On the bright side we watched more One Piece, I got to play some FFXI, and we binged The Promised Neverland. Plus we were able to ride some more One Wheels and get Nova's blanket washed.